AF
HomeTagSubmit NotesAsk AnythingLoginSubscribe Us
AF
1. Feel Free to ask and submit anything on Anyforum.in and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.



corejava-programming: Super man problem

Superman has laser powerd eyes. Laser rays from his eyes can melt iron. The temperature of the laser rays is measured in Fahrenheit (F).Write a programme to convert the temperature from Fahrenheit (F) to Celsius (C).Accept the value of Fahrenheit from user. Hint: (F - 32) x 5/9 = C Sample input: 98 Sample Output: 36.666666666666664

corejava x 333
programming x 150
Posted On : 2016-08-02 23:03:47.0
profile Boopalan - anyforum.in Boopalan
3730
up-rate
5
down-rate

Answers


import java.util.*;

public class FahrenheitToCelsius
{

public static void main(String[] ar)
{

double temperatue;

System.out.println("Enter temperatue in Fahrenheit");

Scanner scanner = new Scanner(System.in);
temperatue = scanner.nextInt();

temperatue = ((temperatue - 32)*5)/9;

System.out.println("Temperatue in Celsius = " + temperatue);
}
}

Posted On : 2016-08-03 08:17:35
Satisfied : 1 Yes  0 No
profile MOHAMMAD SALEEM BASHA - anyforum.in MOHAMMAD SALEEM BASHA
266150
Reply This Thread
up-rate
3
down-rate

import java.util.Scanner;

public class FahrenheitToCelsius {
public static void main(String[] ar) {
double temperatue;

Scanner scanner = new Scanner(System.in);
temperatue = scanner.nextInt();

temperatue = ((temperatue - 32)*5)/9;

System.out.println(temperatue);
}
}

Posted On : 2016-08-03 11:42:58
Satisfied : 1 Yes  0 No
profile Rishi Kumar - anyforum.in Rishi Kumar
523185418912
Reply This Thread
up-rate
4
down-rate



Post Answer
Please Login First to Post Answer: Login login with facebook - anyforum.in