Created
October 23, 2011 13:21
-
-
Save wbzyl/1307354 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* wypisz zestawienie temperatur Fahrenheita-Celsjusza | |
argumenty wywołania programu */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) { | |
int lower; /* dolna granica temperatur */ | |
int upper; /* górna granica */ | |
int step; /* rozmiar kroku */ | |
int fahr; | |
lower=atoi(argv[1]); | |
upper=atoi(argv[2]); | |
step=atoi(argv[3]); | |
printf("lower = %d, upper = %d, step = %d\n",lower,upper,step); | |
for (fahr=lower; fahr<=upper; fahr=fahr+step) { | |
printf("%3d%6.1f\n",fahr,(5.0/9.0)*(fahr-32)); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment