Created
September 16, 2014 18:52
-
-
Save raydvard/9e7e02668ac358f2c786 to your computer and use it in GitHub Desktop.
Input 3 subjects number for 3 individual students and find out individual average marks by RD
This file contains 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
#include<stdio.h> | |
int main() | |
{ | |
int a, b, c; | |
int ns, avg; | |
ns = 0; | |
while( ns <= 2 ) | |
{ | |
printf("\nInput Number A : "); | |
scanf("%d", &a); | |
printf("Input Number B : "); | |
scanf("%d", &b); | |
printf("Input Number C : "); | |
scanf("%d", &c); | |
avg = (a + b + c) / 3; | |
printf("\nAverage Number : %d", avg); | |
ns = ns + 1; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment