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

What is prototype for that c string function?

811


What is meant by the term name mangling in c++?

646


What is the role of static keyword for a class member variable?

754


What language is a dll written in?

658


Define Virtual function in C++.

764






What is difference between malloc()/free() and new/delete?

768


What is constant in c++ with example?

759


What is the difference between public, private, and protected access?

723


What is microsoft c++ redistributable?

721


Which bitwise operator is used to check whether a particular bit is on or off?

716


What is the best it certification?

745


Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300

1921


Can we distribute function templates and class templates in object libraries?

709


Is sorted c++?

746


Define vptr.

716