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

Is string part of stl?

1270


What is binary search in c++?

1085


How is modularity introduced in C++?

1284


Write a struct time where integer m, h, s are its members?

1018


What is std namespace in c++?

1232


C is to C++ as 1 is to a) What the heck b) 2 c) 10

1114


How the keyword struct is different from the keyword class in c++?

1090


Why is c++ still used?

1137


What are the advantages of c++?

1995


What is object in oop?

1171


What is the use of vtable?

1194


write a programe to calculate the simple intrest and compund intrest using by function overlading

2263


What is operator overloading in c++ example?

1184


Why do we need c++?

1107


Write about the role of c++ in the tradeoff of safety vs. Usability?

1128