1 solutions
-
0
C :
#include <stdio.h> #include <string.h> #include <ctype.h> #include <iso646.h> #include <math.h> #include <malloc.h> int ctof (int C) { int F; F=32+C*9.0/5; return F; } int main() { int low=-100,top=150; int c,f; for (c=low;c<=top;c+=5) { f=ctof(c); printf ("c=%d->f=%d\n",c,f); } return 0; }C++ :
#include <stdio.h> int ctof(int c); int main() { for (int i = -100; i <= 150; i += 5) { printf("c=%d->",i); printf("f=%d\n",ctof(i)); } return 0; } int ctof(int c) { return 32 + c * 9 / 5; }
- 1
Information
- ID
- 17558
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By