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 string part of stl?
What is binary search in c++?
How is modularity introduced in C++?
Write a struct time where integer m, h, s are its members?
What is std namespace in c++?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
How the keyword struct is different from the keyword class in c++?
Why is c++ still used?
What are the advantages of c++?
What is object in oop?
What is the use of vtable?
write a programe to calculate the simple intrest and compund intrest using by function overlading
What is operator overloading in c++ example?
Why do we need c++?
Write about the role of c++ in the tradeoff of safety vs. Usability?