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

Answer Posted / sham

int main()
{
int i,j,k,l=0,n;
printf("Enter the length\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
k=2;
for(j=0;j<i+l;j++)
{
if(i<=j)
{
printf("%d",i+j-k);
k=k+2;
}
else
printf("%d",i+j);
}
l++;
printf("\n");
}
}

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is function pointer c?

586


main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

636


How many types of functions are there in c?

585


When we use void main and int main?

588


What is wrong with this initialization?

593






Define recursion in c.

702


What is ponter?

774


What is function definition in c?

588


Why is c still so popular?

618


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

14964


Explain indirection?

648


Which is an example of a structural homology?

785


Define macros.

785


How do you print only part of a string?

615


How can I open a file so that other programs can update it at the same time?

661