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...

print the pattern 1
2 4
3 6 9
4 8 12 16
5 10 15 20 25
if n=5

Answer Posted / vamsi talapatra

#include<iostream>
using namespace std;
int main(){
int n = 1;
int l = 1;
while(n<=5){
for(int i = 1; i<=l; i++){
cout<<n*i<<" ";
}
cout<<endl;
l++;
n++;
}
return 0;
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a variable be both static and volatile in c?

975


When c language was developed?

1011


What are the features of c language?

1025


What is array in c with example?

1169


Does free set pointer to null?

955


What is dynamic variable in c?

990


What is calloc()?

1033


Where are the auto variables stored?

1092


Why can't I perform arithmetic on a void* pointer?

1047


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

2136


Explain what is the stack?

1043


What is c language and why we use it?

1005


WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

1802


Difference between exit() and _exit() function?

1080


Explain indirection?

1064