Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Ahmad zanboua
- public class CelsiusToFahrenheit
- {
- public static void main(String[] args)
- {
- float celsius = -20;
- double fahrenheit = 0.0;
- while(celsius<= 20){
- celsius= celsius+5;
- fahrenheit = ((9 * celsius) / 5) + 32;
- System.out.println(celsius + " °C = " + fahrenheit + " °F" );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement