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
How can I get the current date or time of day in a c program?
Tell me when is a void pointer used?
What is memcpy() function?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
What are the differences between new and malloc in C?
How does free() know explain how much memory to release?
What is a void pointer in c?
What are called c variables?
What is the meaning of typedef struct in c?
What is the difference between #include
What is the use of a semicolon (;) at the end of every program statement?
Is fortran faster than c?
What is the difference between the local variable and global variable in c?
What is the maximum length of an identifier?