print pattern
1 1
33 33
555 555
77777777
555 555
33 33
1 1
Answer Posted / kiran kumar
#include<stdio.h>
main()
{
int i,j,space=6,val=1;
for(i=0;i<4;i++)
{
for(j=0;j<=i;j++)
printf("%d",val);
for(j=0;j<space;J++)
printf(" ");
for(j=0;j<=i;j++)
printf("%d",val);
space-=2;
val+=2;
}
repeat code once again;
space+=2;
val-=2
}
| Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
If the size of int data type is two bytes, what is the range of signed int data type?
What is the auto keyword good for?
How can a number be converted to a string?
What is the process to create increment and decrement stamen in c?
What is function pointer c?
What is the purpose of macro in C language?
What does == mean in texting?
Write a program on swapping (100, 50)
What do you understand by friend-functions? How are they used?
What are the types of functions in c?
Do you know the purpose of 'register' keyword?
Why is c fast?
List a few unconditional control statement in c.
c language interview questions & answer
What are the types of pointers?