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 ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which ide is best for c++?

1091


What is an example of genetic polymorphism?

1242


How can you force the compiler to not generate them?

1088


What is #include iostream?

1300


What is copy constructor? Can we make copy constructor private in c++?

1130


Tell me difference between constant pointer and pointer to a constant.

1276


What is solid in oops?

1207


what type of questions

2177


What do you mean by friend class & friend function in c++?

1114


What is a multiset c++?

1209


What is the benefit of encapsulation?

1124


What kind of problems can be solved by a namespace?

1137


What is a unnitialised pointer?

1140


Explain the virtual inheritance in c++.

1113


What are multiple inheritances (virtual inheritance)?

1114