c program pls help.
Attachments:
Answers
Answered by
0
Explanation:
- #include<stdio.h>
- #include<conio.h>
- void main(){
- float arr[1][15], val=0, avg=0;
- for(int i=0; i<1; i++){
- for(int j=0; j<15; j++){
- scanf("%f", &arr[i][j]);
- }
- }
- for(int i=0; i<1; i++){
- for(int j=0; j<15; j++){
- printf("%f", arr[i][j]);
- }
- }
- for(int i=0; i<1; i++){
- for(int j=0; j<15; j++){
- val+= arr[i][j];
- }
- }
- avg = val/15;
- printf("The average of the given inputs is : %f", avg);
- }
Similar questions