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
Why do we need oop?
Which is most difficult programming language?
write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)
What is a c++ object?
How do you master coding?
What is a class template?
What is the problem with multiple inheritance?
Which language is pure oop?
What is the difference between a baller and a reference in C++?
What are the benefits of polymorphism?
What is public, protected, private in c++?
How stl is different from the c++ standard library?
What does and I oop and sksksk mean?
Is c++ a difficult language?
What is basic if statement syntax?