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 an operator?
What is null character in c?
what is uses of .net
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
Differentiate between static and dynamic modeling.
Explain how can I convert a number to a string?
What is meant by gets in c?
What is && in c programming?
How to compare array with pointer in c?
Describe the steps to insert data into a singly linked list.
Linked lists -- can you tell me how to check whether a linked list is circular?
What are disadvantages of C language.
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
What is string concatenation in c?
How can you access memory located at a certain address?