program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
Answer Posted / letskools
I think th correct program is this for the above output
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=0;i<=5;i++)
{
for(j=i;j<=5;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
What is ## preprocessor operator in c?
What is call by value in c?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
When should a far pointer be used?
what value is returned to operating system after program execution?
Why c language is called c?
Is it possible to execute code even after the program exits the main() function?
What are the different file extensions involved when programming in C?
Are the variables argc and argv are always local to main?
What is null pointer in c?
Is null a keyword in c?
Explain how can I remove the trailing spaces from a string?
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
What are loops c?
Explain the use of 'auto' keyword in c programming?