Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <math.h>
- #include <stdlib.h>
- int main()
- {
- int a = 0;
- int b = 0;
- int c = 0;
- int d = 0;
- int e = 0;
- scanf("Enter the 1st number %d /n", &a);
- printf("Enter the 2nd number ");
- scanf("%d /n", &b);
- printf("Enter the 3rd number ");
- scanf("%d /n", &c);
- printf("Enter the 4th number ");
- scanf("%d /n", &d);
- printf("Enter the 5th number ");
- scanf("%d /n", &e);
- int res = (a + b + c + d + e)/5;
- printf("The average of all the numbers is %d", res);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement