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
How can you find the exact size of a data type in c?
Explain the priority queues?
How do we open a binary file in Read/Write mode in C?
application attempts to perform an operation?
Explain union. What are its advantages?
Is there a way to switch on strings?
How is = symbol different from == symbol in c programming?
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.
What is infinite loop?
What is the purpose of sprintf() function?
Explain what is dynamic data structure?
What is difference between && and & in c?
If you know then define #pragma?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
In C, What is the #line used for?