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 / gayatri chhotray
#include<iostream>
using namespace std;
int main()
{
int i;
int j;
int n = 118;
char c;
for(i = 1; i <= 5; i++)
{
for(j = 122; j >= n +(i-1); j--)
{
c = j;
cout<<c<<" ";
}
for(j=j+2; j<=122; j++)
{
c = j;
cout<<c<<" ";
}
cout<<endl;
}
return 0;
}
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Explain the different access specifiers for the class member in c++.
Give example of a pure virtual function in c++?
Which operator cannot overload?
Describe new operator and delete operator?
How do you flush std cout?
What is namespace std; and what is consists of?
What is the best c++ compiler for windows 10?
What is the difference between cin.read() and cin.getline()?
How did c++ get its name?
What is anonymous object in c++?
Explain abstraction.
Why do we use classes in programming?
What is a class template in c++?
What is the use of register keyword with the variables?
What does n mean in c++?