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
Can a function argument have default value?
How do I use strcmp?
Differentiate call by value and call by reference?
What is c method?
Can you apply link and association interchangeably?
how to capitalise first letter of each word in a given string?
What is nested structure with example?
What is the difference between arrays and pointers?
What are the types of i/o functions?
Which function in C can be used to append a string to another string?
What tq means in chat?
What is structure in c definition?
Explain how do you print only part of a string?
What is uint8 in c?
What are Macros? What are its advantages and disadvantages?