12344321
123 321
12 21
1 1 how i print this program??
Answer Posted / vamsi talapatra
#include<iostream>
using namespace std;
int main(){
int n = 4;
while(n>0){
for(int i = 1; i<=n; i++){
cout<<i;
}
cout<<" ";
for(int i = n; i>0; i--){
cout<<i;
}
n--;
cout<<endl;
}
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the keywords in c?
What are the 32 keywords in c?
What are the advantages of Macro over function?
Explain what is meant by 'bit masking'?
What is a null pointer in c?
How many types of operators are there in c?
What is the purpose of void pointer?
what is the structure pointer?
Explain indirection?
What is data structure in c programming?
Is that possible to add pointers to each other?
What is exit() function?
What is a loop?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
Why can't I perform arithmetic on a void* pointer?