write a program to read the elements in two dimensional array and add 9 to each elements of array and print it.

#include<stdio.h>
#include<conio.h>
int main()
{
int a[4][4],n,m,i,j;
printf("Enter the no of row and column\n");
scanf("%d%d",&n,&m);
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("Result after adding 9 with each element of given array\n");
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
printf("%d\t",a[i][j]+9);
}
printf("\n");
}
getch ();
}

Comments

Popular posts from this blog

write a program for insertion sort with example.