write a pgm to print
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
Answer Posted / nisrar
void main()
{
int i,j,k,m;
for(i=1;i<=4;i++)
{
for(j=4;j>i;j--)
{
printf(" ");
}
for(k=1;k<=i;k++)
{
printf("%d",k);
}
for(m=i;m>1;m--)
{
printf("%d",m-1);
}
printf("\n");
}
}
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is a c token and types of c tokens?
Is file a keyword in c?
Explain the term printf() and scanf() used in c language?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What is an array in c?
How many identifiers are there in c?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
How can I find out how much free space is available on disk?
regarding pointers concept
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What is "Hungarian Notation"?
How do I use strcmp?
What is the difference between printf and scanf )?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..