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


Please Help Members By Posting Answers For Below Questions

What does asterisk mean in c++?

587


What is virtual methods?

659


Which software is best for programming?

663


How did c++ start?

616


Explain selection sorting?

638






What is the role of static keyword for a class member variable?

629


Which software is best for c++ programming?

580


What are smart pointers?

672


What are the advantages of prototyping?

567


Does there exist any other function which can be used to convert an integer or a float to a string?

653


How many types of classes are there in c++?

596


Can char be a number c++?

596


What is an object in c++?

614


how to access grid view row?

1814


what are the decision making statements in C++? Explain if statement with an example?

654