#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <stdarg.h> #include <conio.h> #include <math.h> #include <string.h> int main() { char s[101]=""; long a,b,c; double x,y; double z; /*if(freopen("input.txt", "rt", stdin)==0) { }*/ /*if(freopen("output.txt", "wt", stdout)==0) { errorMsg("Opened file '%s' is error!\n","output.txt"); }*/ while (gets(s)!=NULL) { if(sscanf(s,"%ld %ld %ld",&a,&b,&c)==3) { x=a+b+c; y=a*b*c; z=x/3.0; printf("%0.0f %0.0f %0.2f\n",x,y,z); } } return 0; } /* Main.c:6:19: fatal error: conio.h: No such file or directory #include <conio.h> ^ compilation terminated. */ |
Double click to view unformatted code.