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
What is the use of in c?
How do you define a function?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
Write a c program to demonstrate character and string constants?
What are unions in c?
Stimulate calculator using Switch-case-default statement for two numbers
What is a good data structure to use for storing lines of text?
What are the advantages of Macro over function?
Who is the founder of c language?
Which header file is essential for using strcmp function?
Why does not c have an exponentiation operator?
What is int main () in c?
What is extern c used for?