Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  Daniel Peretz
Language: C/C++
Code:
#include <stdio.h> 
int main(int argc, char *argv[]) 
{int grade, max=0, sum=0, mone=0; 
float avg=0; 
do 

printf("enter your grade"); 
scanf("%d",&grade); 
if(max<=grade) max=grade; 
if(grade>0) mone++; 
sum=sum+grade; 
avg=sum/mone; 

while(grade>0); 

printf("the max:   %d  the memoza  %f", max, avg); 
getchar(); 
getchar(); 
     return 0; 
}
          
          
          
          
          
Comments: