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
Ask to write virtual base class code?
What are the uses of pointers?
Do vectors start at 0 c++?
Is c++ an oop?
List the special characteristics of constructor.
Explain what data encapsulation is in c++?
Define basic type of variable used for a different condition in C++?
What flag means?
How is c++ used in the real world?
Why is main an int?
What is data structure in c++?
What is an undefined reference/unresolved external symbol error and how do I fix it?
how to connect with oracle 9i with server in socket program in c/c++
What is data hiding c++?
Why c++ is created?