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 ? | 1 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 are the major differences between C and C++?
What is the purpose of a constructor? Destructor?
Write a program to generate the Fibonocci Series in C++.
what is friend function in C++?
Write a program to display the following output using a single cout statement Maths=90 Physics=77 Chemistry = 69
What is Boyce Codd Normal form?
What does it mean to declare a member function as virtual in C++?
write a program To generate the Fibonacci Series.
What are the advantages/disadvantages of using inline and const?
How can you force the compiler to not generate them?
Write a program that ask for user input from 5 to 9 then calculate the average
Write a C++ program to print strings in reverse order.