1
232
34543
4567654
can anyone tell me how to slove this c question

Answer Posted / santhoo035

#include<stdio.h>
void di(int n)
{
int c=0,i,j;
for(i=1;i<n;i++)
{
for(j=i;j<=(2*i-1)+(i-1);j++)
{
if(j<(2*i-1))
{
printf("%d",j);
continue;
}
else if(j==(2*i-1))
c=j;
printf("%d",c--);
}
printf("\n");
}
}
int main()
{
di(5);
}

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What should malloc() do?

639


What is uint8 in c?

634


Write a factorial program using C.

637


When should you not use a type cast?

655


What is assert and when would I use it?

573






What is return type in c?

635


When was c language developed?

695


In a byte, what is the maximum decimal number that you can accommodate?

621


Write a program on swapping (100, 50)

634


How can you tell whether two strings are the same?

821


What is wrong with this program statement? void = 10;

813


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. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures

2736


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

628


How do you define CONSTANT in C?

647


What does the characters “r” and “w” mean when writing programs that will make use of files?

848