Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #define STEP 20
- int main()
- {
- const int LOWER = 0;
- const int UPPER = 300;
- int cel;
- float fahr;
- printf("Celsius to Fahrenheit Converter\n");
- printf("C\tF\n");
- for(cel = LOWER;cel < UPPER;cel += STEP){
- fahr = cel * 9/5 + 32;
- printf("%d\t%g\n", cel, fahr);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement