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
What are structs in c++?
What is a stack c++?
What are the types of array in c++?
How long will it take to learn programming?
What are the types of container classes?
Why is c++ not purely object oriented?
What is a manipulator in c++?
What is class invariant in c++?
Show the application of a dynamic array with the help of an example.
What is the difference between map and hashmap in c++?
Which programming language's unsatisfactory performance led to the discovery of c++?
How delete [] is different from delete?
What are references in c++?
What is function declaration in c++ with example?
What are references in c++? What is a local reference?