Animal Names and Sounds APplication for Kids

Animal Names and Sounds APplication for Kids
Click on above image to see application

Write a C program to find the total and average of the marks given in an array.

void main()
{
     int i;
     int Avg;
     int maks[20]; 
     clrscr();
     sum=0;
     for(i=0;i<=9;i++)
     {
           printf(" Enter Marks/n ");
           scanf("%d",&marks[i] );   
     }
     for(i=0;i<=9;i++)
     {
           sum = sum + marks[i];
           Avg = sum/10;
           printf(" Total= %d\n" , sum);
           printf(" Average Marks = %d\n" , Avg);
     }
} 

No comments:

Post a Comment