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
What is the use of ?: Operator?
how do you programme Carrier Sense Multiple Access
What is self-referential structure in c programming?
What are the types of data types and explain?
C program to find all possible outcomes of a dice?
Why do we need arrays in c?
What is the purpose of sprintf?
develop algorithms to add polynomials (i) in one variable
What does do in c?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
What is the use of bit field?
How can I call a function with an argument list built up at run time?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What is structure of c program?