-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0274398
commit 66859fd
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/*convert temperature from celcius to farenheit*/ | ||
import java.util.Scanner; | ||
public class temperature_celTofar { | ||
public static void main(String[] args) { | ||
Scanner sc=new Scanner(System.in); | ||
System.out.println("Enter the temp in cel"); | ||
float tempC = sc.nextFloat(); | ||
float tempF = (tempC * 9/5) +32; | ||
System.out.println(tempF); | ||
} | ||
} |