Java Program to Convert Celcious TO Fahrenheit
Program -
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter a celcious");
float c= sc.nextInt();
float a,b;
a=c*9;
b=a/5;
c=b+32;
System.out.println("fahrenhit is "+c);
}
}
Output -
Enter a celcious
23
fahrenhit is 73.4
Comments
Post a Comment