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 are guid?
what do you mean by exception handling in C++?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
Which is better struts or spring?
What does namespace mean in c++?
what are Operators and explain with an example?
What is the stl, standard template library?
Why do we use class in oops?
What is the first name of c++?
What is function overloading c++?
Do vectors start at 0?
How do you master coding?
What is difference between oop and pop?
Search for: what is pair in c++?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?