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
What are the advantages of using const reference arguments in a function?
What are static member functions?
Is c++ a good first language to learn?
Explain what are single and multiple inheritances in c++?
Is c++ platform dependent?
What are advantages of c++?
What is the difference between while and do while loop?
Why cout is used in c++?
State two differences between C and C++.
What is stack unwinding?
How do I get good at c++ programming?
What is a base class?
what kind of projects are suitable for c and c++
What is an inline function in c++?
Evaluate !(1&&1||1&&0) a) Error b) False c) True