print the pattern 1
2 4
3 6 9
4 8 12 16
5 10 15 20 25
if n=5
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / akshay chinche
#include<stdio.h>
int main()
{
int i,j,k,n=5,temp=2,fix;
fix=k=1;
for(i=1;i<=4;i++)
{
fix++;
k=fix;
for(j=1;j<=n;j++)
{
if(j<=i+1)
{
printf("%d ",k);
k=k+temp;
}
}
k=0;
temp++;
putchar (10);
}
return 0;
}
Is This Answer Correct ? | 0 Yes | 0 No |
how to find your architecture is LittleEndian or BigEndian?
code for reverse alternate words from astring
an algorithem for the implementation of circular doubly linked list
write the program for maximum of the following numbers? 122,198,290,71,143,325,98
What is the mean of this statement:: if(int i=0 * i=9)
Write a program that receives as input a number omaadel-n-print, four digits.
What are the different pointer models in c?
What 'lex' does?
Please write me a program to print the first 50 prime numbers (NOT between the range 1 -50)
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
show how link list can be used to repersent the following polynomial i) 5x+2
What is the use of pointers in C?
0 Answers Impetus, Motorola, Tavant Technologies, Virtusa,