Can someone help me with a c code Develop a two dimensional
Solution
#include<iostream.h>
 #include<conio.h>
 #include <stdio.h>
 #include <stdlib.h>
void main()
 {
 int a[10][10];
 int i,j;
 float average;
 int sum=0;
 for(i=0;i<10;i++)
 {
 for(j=0;j<10;j++)
 {
 a[i][j] = rand()%100+1;
 }
 }
 cout<<\"Elements of array are\"<<endl;
 for(i=0;i<10;i++)
 {
 for(j=0;j<10;j++)
 {
 cout<<a[i][j];
 }
 }
 cout<<endl;
 cout<<\"Elements of array after sorting\"<<endl;
 for(int row = 0; row < 10; row++)
 {
 for(int i=0;i<10;i++)
 {
 for(int j=i;j<10;j++)
 {
 if(MyArray[row][i]<MyArray[row][j]) //the condition was flipped in the program you gave me, notice that would have sorted them ascendingly
 {
 int temp= a[row][i];
 a[row][i]=a[row][j];
 a[row][j]=temp;
 }
 }
 }
 }
for(i=0;i<10;i++)
 {
 for(j=0;j<10;j++)
 {
 cout<<a[i][j];
 sum = sum+a[i][j];
 }
 }
 cout<<endl;
 average = sum/10;
 cout<<\"Sum of elements of array is\"<<sum<<endl;
 cout<<\"Average of elements of array is\"<<average<<endl;
 }


