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 / prasenjit roy
#include <iostream>
using namespace std;
#define START 'z'
#define END 'v'
#define LIMIT ( START - END + 1 )
int main(int argc, char* argv[])
{
int i,j;
for( i=0; i<LIMIT; i++){
char ch = START+1;
for( j=0; j<LIMIT; j++)
if( j>=i )
cout<<--ch<<" ";
else
cout<<" ";
for( j=LIMIT-1; j>i ; j--)
cout<<++ch<<" ";
cout<< endl;
}
return 0;
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is ofstream c++?
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
Is oops and c++ same?
Describe the setting up of my member functions to avoid overriding by the derived class?
How did c++ get its name?
What are arrays c++?
How should a contructor handle a failure?
What are the important differences between c++ and java?
Do you know the problem with overriding functions?
What does ctime() do?
Why do we need pointers?
Differentiate between the message and method in c++?
what is software cycle? What is a mission critical system ? What is the important aspect of a real-time system ? Explain the difference between microkernel and macro kernel. Give an example of microkernel.Why paging is used ? Which is the best page replacement algo and Why ? What is software life cycle ? How much time is spent usually in each phases and why Which one do U want to work if selected in Honeywell ? Which are the different types of testing ? What is a distributed system ? Some questions about CSP. Which languages do U know ? What are the differences between Pascal and C. questions from Compiler construction and Lisp. Which are the different computer architecture? What is the requirement in MIMD ? What is the difference between RISC and CISC processors ? Difference between loosely coupled and tightly coupled systems ? What is an open system?
What do you mean by function and operator overloading in c++?
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.