program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
Answer Posted / dhruv sharma rkdf
#include<stdio.h>
#include<conio.h>
void main(){
int i,j;
clrscr();
for(i=1;i<=5;i++){
for(j=i;j<=5;j++){
printf("%d ",j)
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Can we access array using pointer in c language?
How do you list files in a directory?
Is there sort function in c?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
What is a void pointer? When is a void pointer used?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
Explain what are the __date__ and __time__ preprocessor commands?
What is c++ used for today?
What is calloc()?
What are local variables c?
How can I sort more data than will fit in memory?
Give differences between - new and malloc() , delete and free() ?
What is the difference between malloc() and calloc()?
What is wrong with this initialization?
Why is c platform dependent?