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 wrong with this program statement?
How can type-insensitive macros be created?
What does do in c?
Explain how can you be sure that a program follows the ansi c standard?
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
How pointers are declared?
How can you find the day of the week given the date?
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
Describe how arrays can be passed to a user defined function
What is the purpose of void in c?
write a program to concatenation the string using switch case?
What would be an example of a structure analogous to structure c?
How can I access an I o board directly?
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
What is the most efficient way to count the number of bits which are set in an integer?