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

Difference between MAC vs. IP Addressing

1154


Is there any demerits of using pointer?

1075


What is the use of header files?

1114


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.

2842


Explain pointer. What are function pointers in C?

1085


What is the method to save data in stack data structure type?

1092


What is a static function in c?

1171


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1701


How macro execution is faster than function ?

1199


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

1037


write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values.  The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.

3482


What is the use of extern in c?

1096


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

1308


What does calloc stand for?

1168


Define and explain about ! Operator?

1003