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
What is a stack? How it can be implemented?
What is abstract class in oop?
Which is the best c++ software?
Is c++ the hardest programming language?
Explain what happens when a pointer is deleted twice?
Explain function prototypes in C++.
Can a program run without main?
Explain the difference between c & c++?
How much is c++ certification?
What are the characteristics of friend functions?
What is the difference between function overloading and operator overloading?
What does and I oop mean in text?
How to defines the function in c++?
Is it possible for the objects to read and write themselves?
I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...