Computer Science, asked by sanjayyadav9454, 2 months ago

write a program that reads marks in subject and calculate total marks using do while loop​

Answers

Answered by DeepakSainiTlk
0

Answer:

#include<stdio.h>

int main()

{

      int n=1,marks,s=0;

      printf("/*Enter Marks of Student\nfor 5-Subjects*/\n");

      do

      {

            printf("\n Subject-%d : ",n);

            scanf("%d",&marks);

            s=s+marks;

            n++;

      }while(n<=5);

      printf("-------------------------");

      printf("\n Total Marks : %d\n",s);

      return 0;

}

Similar questions