Skip to content

Commit

Permalink
added temp converter
Browse files Browse the repository at this point in the history
  • Loading branch information
haspdecrypted committed Nov 5, 2022
1 parent 0274398 commit 66859fd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions temperature_celTofar.java
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);
}
}

0 comments on commit 66859fd

Please sign in to comment.