write a program in c++ to generate imp
z y x w v w x y z
z y x w x y z
z y x y z
z y z
z
Answer Posted / naman patidar
#include <iostream.h>
int main(){
char start ='z';
char end ='v';
int limit = start-end+1;
for(int i=0; i<limit; i++){
char ch = start+1;
for(int j=0; j<limit; j++){
if( j>=i ){
cout<<--ch<<"\t";
} else {
cout<<"\t";
}
}
for(int k=limit-1; k>i ; k--){
cout<<++ch<<"\t";
}
cout<<"\n\n";
}
return 0;
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Is turbo c++ free?
Why c++ is created?
What is the use of string in c++?
What you know about structures in C++?
Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes
Which is the best c++ software?
What is an accessor in c++?
Is c or c++ more useful?
Write bites in Turbo c++ Header ("Include") Files.
What is string in c++ programming?
Can we use struct in c++?
What is cout flush?
What is the operator in c++?
What is function overloading in C++?
What are move semantics?