AIm:-Write Program  for Find Result of Student Using Programming c

 

Input:-

 

#include<stdio.h>

int main()

{

    int n,m,i,j,marks,total,average;

    printf(“enter number of student and subject\n “);

    scanf(“%d%d”,&n,&m);

    printf(“\n”);

    for(i=1;i<=n;i++)

    {

        total=0;

        printf(“enter marks of subject\n”);

        for(j=1;j<=m;j++)

        {

            scanf(“%d”,&marks);

            total=total+marks;

            average=total/3;

        }

        printf(“total marks=%d”,total);

        printf(“average marks=%d”,average);

        return 0;

        

    }

}

Output:-

enter number of student and subject

2

3

enter marks of subject

40

40

40

total marks=120average marks=40

Advertisements