View Code of Problem 26

# include<stdio.h>
int main(void)
{
  float f,c;
  while(scanf("%d",f)!=EOF)
    {
      c = (f-32)*5/9;
      printf("%.2f",c)
    }
  return 0;
}
/*
Main.c: In function 'main':
Main.c:5:3: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'double' [-Wformat=]
   while(scanf("%d",f)!=EOF)
   ^
Main.c:9:5: error: expected ';' before '}' token
     }
     ^
*/

Double click to view unformatted code.


Back to problem 26