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


Please Help Members By Posting Answers For Below Questions

What is an operator?

649


What is null character in c?

677


what is uses of .net

1259


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

649


Differentiate between static and dynamic modeling.

605






Explain how can I convert a number to a string?

636


What is meant by gets in c?

595


What is && in c programming?

665


How to compare array with pointer in c?

610


Describe the steps to insert data into a singly linked list.

612


Linked lists -- can you tell me how to check whether a linked list is circular?

631


What are disadvantages of C language.

635


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?

971


What is string concatenation in c?

560


How can you access memory located at a certain address?

656