ACCEPT DIMENSION OF ALL SQUARE MATRIX ACCEPT DATA FROM THE USER & PRINT IT TRANSPOSE


#include<stdio.h>
#include<conio.h>
void main()
{
int a[10][10],i,j,r,c;
printf("Enter Dimension");
scanf("%d %d",&r,&c);
printf("Enter %d Values",r*c);
for(i=0;i<r;i++)
  {
   for(j=0;j<c;j++)
   {
   scanf("%d",&a[i][j]);
   }
  }
  printf("The Entered Values Are\n");
  for(i=0;i<r;i++)
    {
     for(j=0;j<c;j++)
     {
     printf("%d",a[i][j]);
     }
     printf("\n");
    }
getch();
}

0 comments: (+add yours?)

Post a Comment