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
How one would use switch in a program?
Define a pointer to a data member of the type pointer to pointer?
Is java a c++?
Why is c++ awesome?
Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers
Can a new be used in place of old mallocq? If yes, why?
What is string in c++ programming?
What is the difference between a template and a macro?
What is abstraction with real time example?
Differentiate between an inspector and a mutator ?
Can c++ do everything c can?
How would you call C functions from C++ and vice versa?
Is c++ vector a linked list?
Can notepad ++ run c++?
Do you need a main function in c++?