Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n, i, j, k, temp, sum;
- n = 10;
- sum = 0;
- int arr[n];
- printf("Enter the %d numbers : ", n);
- for(i = 0; i < n; i++)
- scanf("%d", &arr[i]);
- for(i = 0; i < n; i++)
- sum += arr[i];
- printf("\nThe average of those numbers : %f\n", (float)sum/n);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement