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 |
Write a C++ Program to Check Whether a character is Vowel or Consonant.
What is the 4 difference between delete[] and delete?
Discuss about iteration statements in C++ .
What is the difference between public, private, and protected inheritance?
Write a program to read two numbers from the keyboard and display the larger value on the screen
What is pass by value & reference.
What is static variable and difference between(const char *p,char const *p,const char* const p).
How can you force the compiler to not generate them?
What does it mean to take the address of a reference?
What is a constructor initializer list?
What is constant keyword in C++? Illustrate its various uses.
0 Answers Akamai Technologies, Infogain,
What's the value of the expression 5["abxdef"]?