Program In C++
Write a program that creates a two-dimensional integer array (4x3) initialized with user given
data. The program should have the following functions:
Print the sum of all values in the array.
Print the average of all the values in the array.
Take row number from user and print the sum of the values in that specified row.
Take column number from user and print the sum of the values in that specified column.
Take row number from user and print the highest value in that specified row.
Take row number from user and print the lowest value in that specified row.
Take the transpose of array and print it.
Answers
Answered by
0
Answer:
4(3)=12
Explanation:
ggfhhhdjdurhhfurieiieiehruurh
Answered by
7
Explanation:
#include<stdio.h>
int main(){
/* 2D array declaration*/
int disp[2][3];
/*Counter variables for the loop*/
int i, j;
for(i=0; i<2; i++) {
for(j=0;j<3;j++) {
printf("Enter value for disp[%d][%d]:", i, j);
scanf("%d", &disp[i][j]);
}
}
//Displaying array elements
printf("Two Dimensional array elements:\n");
for(i=0; i<2; i++) {
for(j=0;j<3;j++) {
printf("%d ", disp[i][j]);
if(j==2){
printf("\n");
}
}
}
return 0;
HOPE THIS HELPS YOU ❕,,,,,,,,I TOOK AN EXAMPLE AND GAVE YOU
}
Similar questions
Computer Science,
1 month ago
Economy,
1 month ago
English,
1 month ago
Art,
3 months ago
Math,
3 months ago
Biology,
9 months ago
Computer Science,
9 months ago