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 to display the following output using a single cout statement
Maths=90
Physics=77
Chemistry = 69

Answer Posted / hr

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{

char *sub[]={"Maths","Physics","Chemestry"};
int mark[]={90,77,69};
for(int i=0;i<3;i++)
{
cout<<setw(10)<<sub[i]<<setw(3)<<"="<<setw(4)<<mark[i]<<endl;
}
return 0;
}
Output:
Maths=90
Physics=77
Chemistry=69

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is most difficult programming language?

1032


What are c++ manipulators?

1007


What are the three forms of cin.get() and what are their differences?

1156


What is the basic concept of c++?

964


Can there be at least some solution to determine the number of arguments passed to a variable argument list function?

962


Can we provide one default constructor for our class?

633


Difference between pointer to constant and constant pointer to a constant. Give example.

1070


What language does google use?

1082


Is c++ a programming language?

1021


Are c and c++ similar?

1000


What are the advantages of prototyping?

1005


Which compiler does turbo c++ use?

1026


What are properties in oop?

1025


Differentiate between a copy constructor and an overloaded assignment operator.

1021


What is a virtual destructor? Explain the use of it?

943