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<<" ";
}
}
return 0;
}
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
How would you use the functions randomize() and random()?
Explain the uses of static class data?
Is main a class in c++?
What is a string example?
How important is c++?
What is protected inheritance?
What is the limitation of cin while taking input for character array?
Explain what are accessor methods?
If you don’t declare a return value, what type of return value is assumed?
What is difference between malloc()/free() and new/delete?
Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.
Can we sort map in c++?
What are friend classes?
Eplain extern keyword?
What is the return value of the insertion operator?