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 does asterisk mean in c++?
What is virtual methods?
Which software is best for programming?
How did c++ start?
Explain selection sorting?
What is the role of static keyword for a class member variable?
Which software is best for c++ programming?
What are smart pointers?
What are the advantages of prototyping?
Does there exist any other function which can be used to convert an integer or a float to a string?
How many types of classes are there in c++?
Can char be a number c++?
What is an object in c++?
how to access grid view row?
what are the decision making statements in C++? Explain if statement with an example?