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

How can you find the exact size of a data type in c?

601


Explain the priority queues?

626


How do we open a binary file in Read/Write mode in C?

680


application attempts to perform an operation?

1495


Explain union. What are its advantages?

618






Is there a way to switch on strings?

619


How is = symbol different from == symbol in c programming?

614


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

1577


What is infinite loop?

630


What is the purpose of sprintf() function?

602


Explain what is dynamic data structure?

645


What is difference between && and & in c?

599


If you know then define #pragma?

676


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

1893


In C, What is the #line used for?

1061