0% found this document useful (0 votes)
4 views1 page

C Program

c program

Uploaded by

kayani479479
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

C Program

c program

Uploaded by

kayani479479
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#include<stdio.

h>
#include<conio.h>
#include<stdlib.h>
int main()
{
int i=1,cout=1;
int classavg;
while(i<=8)
{system("cls");
int num1,num2,num3;
int num4,num5,num6;
int stdavg;
printf("Enter the marks for subject 1: ");
scanf("%d",&num1);
printf("Enter the marks for subject 2: ");
scanf("%d",&num2);
printf("Enter the marks for subject 3: ");
scanf("%d",&num3);
printf("Enter the marks for subject 4: ");
scanf("%d",&num4);
printf("Enter the marks for subject 5: ");
scanf("%d",&num5);
printf("Enter the marks for subject 6: ");
scanf("%d",&num6);
stdavg=(num1+num2+num3+num4+num5+num6)/6;
printf("the student avg of student %d is %d\n",cout,stdavg);
classavg=classavg+stdavg;
cout++;
i++;
getch();
}
classavg=classavg/cout;
printf("the average of class is %d",classavg);
return 0;
}

You might also like