Write a program to display the following output using a single cout statement
Maths=90
Physics=77
Chemistry = 69
Answers were Sorted based on User's Feedback
#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 |
#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 |
What is Copy Constructor?
What is the meaning of the following declaration: int *const *const *i?
Name the operators that cannot be overloaded.
What is the difference between member functions and static member functions?
What's the value of the expression 5["abxdef"]?
Write a C++ Program to Find whether given Number is Odd or Even.
Write a program to display the following output using a single cout statement Maths=90 Physics=77 Chemistry = 69
Explain the difference between C and C++.
Do you know about Agilent PRECOMPILERS. ?
What are pass by value and pass by reference?what is the disadvantage of pass by value?
Explain the importance of method overloading in C++?
0 Answers Akamai Technologies, Infogain,
what do you mean by exception handling in C++?