Created
July 17, 2017 18:26
-
-
Save ThePratikSah/3a835a84d45d9d0552cfd78ebcc32963 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main() { | |
int marks[3][3], i, j, sum; | |
for (i = 0; i < 3; i++){ | |
printf("Enter three subject marks of student %d\n", i+1); | |
for (j = 0; j < 3; j++) | |
scanf("%d", &marks[i][j]); | |
} | |
for (i = 0; i < 3; i++) { | |
sum=0; | |
for (j = 0; j < 3; j++) | |
sum = sum + marks[i][j]; | |
printf("\nTotal marks of student %d is %d.", i+1, sum); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment