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

What is the best c++ ide?

1108


Explain how the virtual base class is different from the conventional base classes of the opps.

1117


How do you print a string on the printer?

1001


What does I oop mean?

1031


What is the difference between #import and #include?

1009


Mention the storage classes in c++.

1040


Can manipulators fall in love?

968


How does a C++ structure differ from a C++ class?

1085


What is destructor example?

998


What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor

1112


write knight tour problem which is present in datastructure

2614


Why is c++ still best?

940


What is problem with overriding functions?

1018


Why is c++ not purely object oriented?

973


What is polymorphism and why is it important?

997