how can i get the output
54321
4321
321
21
1

in c programming........???? pls help......

Answer Posted / aftab rai

#include<stdio.h>
#include<conio.h>
main()
{
int i,j,n;
printf("enter numbers of lines");
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{printf("%d",i+1+j);}
printf("\n");
}
getch();
}

Is This Answer Correct ?    3 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are compound statements?

579


What is a pointer variable in c language?

616


Explain the difference between #include "..." And #include <...> In c?

600


How to write c functions that modify head pointer of a linked list?

522


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1232






What is meant by int main ()?

694


Tell me when would you use a pointer to a function?

573


How will you declare an array of three function pointers where each function receives two ints and returns a float?

747


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

1876


What is a structure in c language. how to initialise a structure in c?

581


Is c is a procedural language?

574


Explain how can I prevent another program from modifying part of a file that I am modifying?

615


What is substring in c?

615


What is meant by preprocessor in c?

513


Write a program to check prime number in c programming?

570