Pattern
Write a program to print the following output
#include<stdio.h>
main()
{
int a=0,b,c=10,d=8,e,temp=0,res=0,i,j,n=8;
for(b=1;b<=9;b++)
{
for(e=b;e<=b;e++)
{
temp=a*c+b;
res=temp*d+e;
printf("%d",temp);
printf(" X %d + %d = %d\n",d,e,res);
a=temp;
}
}
}
#include
ReplyDeletemain()
{
int i,j,a=0,b=10,temp=0,n=8,r,k,l;
for(i=1;i<=9;i++)
{
temp=a*b+i;
a=temp;
for(j=i;j<=i;j++)
r=temp*n+j;
j=i;
printf("%d X %d + %d=%d",temp,n,j,r);
printf("\n");
}
}