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
Explain the difference between overloading and overriding?
How a macro differs from a template?
How would you use the functions memcpy(), memset(), memmove()?
What is namespace & why it is used in c++?
What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal
Why do we need c++?
What are the restrictions apply to constructors and destructors?
Which is most difficult programming language?
How do I tokenize a string in c++?
What are the differences between malloc() and calloc()?
Explain friend class?
How to declare an array of pointers to integer?
Is c++ an integer?
Is it possible to provide special behavior for one instance of a template but not for other instances?
Is c++ a pure oop language?