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 is stream and its types in c++?
Which bitwise operator is used to check whether a particular bit is on or off?
What is a tree in c++?
What is the difference between prefix and postfix versions of operator++()?
Describe the setting up of my member functions to avoid overriding by the derived class?
A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.
To what does “event-driven” refer?
What do you mean by enumerated data type?
Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()
What does new do in c++?
When do we use copy constructors?
What is object in c++ example?
What is a Default constructor?
Why is c++ so fast?
What is const pointer and const reference?