Advertisement
smeacham

Temperature Conversion

Nov 6th, 2012
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. //
  2. //  main.m
  3. //  Temperature Conversion Table
  4. //
  5. //  Created by Steve on 11/6/12.
  6. //  Copyright (c) 2012 Personal. All rights reserved.
  7. //
  8.  
  9. #import <Foundation/Foundation.h>
  10.  
  11. int main(int argc, const char * argv[])
  12. {
  13.     float c = 0;
  14.    
  15.     // Iterate through Celcius, displaying Farenheight conversion.
  16.     while (c <= 300) {
  17.         printf("%3.0f %6.1f\n", c, (9.0/5.0) * c + 32.0);
  18.         c += 20;
  19.     }
  20.    
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement