Advertisement
Guest User

asd123

a guest
Dec 7th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. //Ahmad zanboua
  2.  
  3.  
  4. public class CelsiusToFahrenheit
  5. {
  6. public static void main(String[] args)
  7. {
  8. float celsius = -20;
  9. double fahrenheit = 0.0;
  10. while(celsius<= 20){
  11. celsius= celsius+5;
  12. fahrenheit = ((9 * celsius) / 5) + 32;
  13.  
  14.  
  15. System.out.println(celsius + " °C = " + fahrenheit + " °F" );
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement