Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. int main(int argc, string argv[])
  2. {
  3. // Celsius
  4. printf("C: ");
  5. if (argc == 2)
  6. {
  7.  
  8. float Celsius = atof(argv[1]);
  9. printf("%.f\n", Celsius);
  10.  
  11. // Fahrenheit
  12. float Fahrenheit= (((Celsius * 9) / 5) + 32);
  13. printf("F: %.1f\n", Fahrenheit);
  14.  
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement