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
Is java based off c++?
Why multiple inheritance is not allowed?
What are member functions used in c++?
Does c++ have foreach?
Can we sort map in c++?
give me an example for testing a program showing the test path .show how the test is important and complex.
What does the linker do?
What does new return if there is insufficient memory to make your new object?
A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
What is polymorphism and its types?
What is c++ prototype?
Is there any function that can skip certain number of characters present in the input stream?
Is c++ proprietary?
What are manipulators used for?
Explain the difference between method overriding and method overloading in C++?