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
Can a variable be both static and volatile in c?
When c language was developed?
What are the features of c language?
What is array in c with example?
Does free set pointer to null?
What is dynamic variable in c?
What is calloc()?
Where are the auto variables stored?
Why can't I perform arithmetic on a void* pointer?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
Explain what is the stack?
What is c language and why we use it?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
Difference between exit() and _exit() function?
Explain indirection?