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 |
Difference between Class and Struct.
13 Answers Ericsson, Motorola, Wipro,
#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }
Explain why c is faster than c++?
What are the application of c?
What is the purpose of main() function?
Which is the best website to learn c programming?
pick out the odd one out of the following a.malloc() b.calloc() c.free() d.realloc()
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist
Why does everyone say not to use gets?
What is the Lvalue and Rvalue?
what is the output of the following code? main() { int I; I=0x10+010+10; printf("x=%x",I); } give detailed reason
what is the difference between declaration ,defenetion and initialization of a variable?