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 keywords in c++?
What are the unique features of C++.
How can you say that a template is better than a base class?
What is the difference between public and private data members?
What are the restrictions apply to constructors and destructors?
How does c++ sort work?
Explain pass by value and pass by reference.
How is computer programming useful in real life?
How does class accomplish data hiding in c++?
What is the difference between object-oriented programming and procedural programming?
Write a Program to find the largest of 4 no using macros.
What is singleton class in c++?
Is c++ a software?
Write a C++ Program to check whether a number is prime number or not?
Explain stack unwinding.