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 |
Output for following program using for loop only * * * * * * * * * * * * * * *
what is the difference between const char *p, char const *p, const char* const p
5 Answers Accenture, Aricent, CTS, Geometric Software, Point Cross, Verizon,
Explain Basic concepts of C language?
Write a code on reverse string and its complexity.
Identify the operators that is not used with pointer a. && b. # c. * d. >>
What is 'makefile' in C langauage? How it be useful? How to write a makefile to a particular program?
How can we open a file in Binary mode and Text mode?what is the difference?
What is the difference between fread and fwrite function?
Explain function?
Explain which function in c can be used to append a string to another string?
write a code for large nos multilication (upto 200 digits)
Hi can anyone tell what is a start up code?