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
Are c and c++ different?
Can union be self referenced?
What is constant in c++ with example?
What can I use instead of namespace std?
What are the advantages of using friend classes?
What is the basic difference between C and C++?
What is the difference between global variables and local variable
What is virtual function? Explain with an example
Why is c++ still best?
Is c++ a pure oop language?
What is the use of this pointer in c++?
Explain the different access specifiers for the class member in c++.
Explain the purpose of the keyword volatile.
what are the iterator and generic algorithms.
Can we use this pointer in a class specific, operator-overloading function for new operator?