Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is the use of in c?

1011


How do you define a function?

1011


#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); }

1164


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

1100


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

1188


Write a c program to demonstrate character and string constants?

2165


What are unions in c?

1016


Stimulate calculator using Switch-case-default statement for two numbers

2967


What is a good data structure to use for storing lines of text?

1069


What are the advantages of Macro over function?

1988


Who is the founder of c language?

1147


Which header file is essential for using strcmp function?

1459


Why does not c have an exponentiation operator?

1039


What is int main () in c?

1068


What is extern c used for?

1042