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


Please Help Members By Posting Answers For Below Questions

FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

1187


Define C in your own Language.

631


please explain every phase in the "SDLC" in the dotnet.

2173


What are enumerated types?

644


general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only

580






Explain the Difference between the New and Malloc keyword.

676


How can I write functions that take a variable number of arguments?

618


What is the difference between new and malloc functions?

570


What is the use of function in c?

702


Write a program to identify if a given binary tree is balanced or not.

674


how could explain about job profile

1446


What are the keywords in c?

637


What is the best organizational structure?

635


What are conditional operators in C?

616


what is uses of .net

1264