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 |
Is it fine to write void main () or main () in c?
Why is c called a mid-level programming language?
what is data structure
Explain the difference between struct and union.
What library is sizeof in c?
Tell me what is the purpose of 'register' keyword in c language?
What are header files in c?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
how would a 4*3 array A[4][3] stored in Row Major Order?
Please list all the unary and binary operators in C.
Please provide question papers of NATIONAL INFORMATICS CENTRE for Scientific officer
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?