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
Can we initialize extern variable in c?
what is a constant pointer in C
Why doesnt this code work?
What are register variables? What are the advantage of using register variables?
What is volatile variable in c?
Which function in C can be used to append a string to another string?
What is the advantage of using #define to declare a constant?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What does sizeof return c?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
Can you write the function prototype, definition and mention the other requirements.
Explain how can you check to see whether a symbol is defined?
How can I write a function that takes a format string and a variable number of arguments?
What is keyword with example?