Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is ofstream c++?

1018


How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

1037


Is oops and c++ same?

994


Describe the setting up of my member functions to avoid overriding by the derived class?

1070


How did c++ get its name?

978


What are arrays c++?

1048


How should a contructor handle a failure?

1119


What are the important differences between c++ and java?

1086


Do you know the problem with overriding functions?

1035


What does ctime() do?

1047


Why do we need pointers?

950


Differentiate between the message and method in c++?

1007


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?

2176


What do you mean by function and operator overloading in c++?

990


Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.

1267