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 is the general form of a C program?
Explain what is dynamic data structure?
What are the advantages of union?
main() { printf("hello"); fork(); }
What is difference between constant pointer and constant variable?
simple program of graphics and their output display
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
What is a buffer in c?
How do you search data in a data file using random access method?
How can you invoke another program from within a C program?
Whats s or c mean?
What is structure padding and packing in c?
What is pragma c?
How can I prevent another program from modifying part of a file that I am modifying?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?