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

Describe delete operator?

1145


What is algorithm in c++ programming?

1183


Why do pointers exist?

1148


Write a program to reverse a string using recursive function?

2406


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2625


What is ostream in c++?

1064


What are the advantages of c++?

1991


Explain class invariant.

1116


Why do we use oops?

1069


What does return 0 do in c++?

1080


What is the difference between passing by reference and passing a reference?

1128


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

1058


What is the difference between the indirection operator and the address of oper-ator?

1168


What is cout flush?

1076


Is string part of stl?

1268