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
Explain what are compound statements?
What is a pointer variable in c language?
Explain the difference between #include "..." And #include <...> In c?
How to write c functions that modify head pointer of a linked list?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
What is meant by int main ()?
Tell me when would you use a pointer to a function?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
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 .
What is a structure in c language. how to initialise a structure in c?
Is c is a procedural language?
Explain how can I prevent another program from modifying part of a file that I am modifying?
What is substring in c?
What is meant by preprocessor in c?
Write a program to check prime number in c programming?