#include <stdio.h> void main (void) { int classes,i,student,y; float avepup,test1,test2,quiz1,quiz2,ahvoda; clrscr(); printf("Insert the number of classes\n"); scanf("%d",&classes); for(i=0;i<classes;i++) { printf("Insert the number of students in the class\n"); scanf("%d",&student); for(y=0;y<student;y++) { printf("Insert the marks of the student\n (2 tests,2 quizes,1 avodat hagasha)\n"); scanf("%f %f %f %f %f",test1,test2,quiz1,quiz2,ahvoda); avepup=(((test1+test2)/4)+((3*quiz1+3*quiz2)/20)+ahvoda/5); printf("%f",&avepup); } } }
|