Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char * argv[])
- {
- float acc = 0.0;
- float inputN = 0.0;
- int i = 0;
- int N = 0;
- printf("How many?: ");
- scanf("%d", &N);
- for (i = 0; i < N; i++)
- {
- printf("Number: ");
- scanf("%d", &N);
- acc += inputN;
- }
- acc /= (float)N;
- printf("acc = %f\N", acc);
- return 0;
- }
Add Comment
Please, Sign In to add comment