Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, string argv[])
- {
- // Celsius
- printf("C: ");
- if (argc == 2)
- {
- float Celsius = atof(argv[1]);
- printf("%.f\n", Celsius);
- // Fahrenheit
- float Fahrenheit= (((Celsius * 9) / 5) + 32);
- printf("F: %.1f\n", Fahrenheit);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement