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


Please Help Members By Posting Answers For Below Questions

How long will it take to learn programming?

800


What are the basic data types used in c++?

766


Mention the purpose of istream class?

821


What do you mean by a template?

826


Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened

1336


When should I use unitbuf flag?

790


What are stacks?

816


How many namespaces are there in c++?

770


Which compiler does turbo c++ use?

817


Why can’t you call invariants() as the first line of your constructor?

769


What is istream and ostream in c++?

805


Differentiate between an inspector and a mutator ?

908


What are function prototypes?

974


Difference between a homogeneous and a heterogeneous container

904


What is the last index number in an array of 100 characters a) 100 b) 99 c) 101

848