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


Please Help Members By Posting Answers For Below Questions

Is multimap sorted c++?

557


Difference between delete and free.

610


How can I learn dev c++ programming?

563


What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?

632


What is linked list in c++?

689






What does it mean to declare a member variable as static?

608


Does c++ have arraylist?

535


What is abstraction in c++?

674


What is the full form of india?

563


Why main function is special in c++?

665


What is c++ used for in games?

600


When must you use a pointer rather than a reference?

598


What are the five basic elements of a c++ program?

575


Explain differences between alloc() and free()?

578


What do you mean by static variables?

600