jeffhuffle17
15.06.2020 •
Computers and Technology
7. Write a program to display the output as follows:
Lets learn together C++ program
It is not so difficult
I
Solved
Show answers
More tips
- F Food and Cooking Pu-erh Tea: History, Varieties, Benefits, and Risks...
- H Health and Medicine How to Whiten Teeth and Get the Perfect Smile...
- F Food and Cooking How to Make Thin Pancakes: Recipe and Tips...
- S Style and Beauty Is Hot Scissor Haircutting Beneficial or Dangerous?...
- S Style and Beauty How to Get Rid of Under Eye Bruises?...
- F Food and Cooking Is Bacon Good for You?...
- S Style and Beauty Discover the Art of Nail Design: How Do You Paint Your Nails?...
- P Philosophy How to Develop Extrasensory Abilities?...
- O Other Everything You Need to Know About Kudyabliks...
- C Computers and Internet The Twitter Phenomenon: What it is and How to Use it...
Answers on questions: Computers and Technology
- M Mathematics Anthony needs a new suit. he has a 20% off coupon that will be applied before a tax of 7.5% is applied to his total. how much will he end up paying for a $275 suit?...
- M Mathematics Complete the statements to find the measurements of ∠a and ∠b ....
- P Physics What are the methods of avoiding demagnezation...
Ответ:
Output
Enter information of students:
For roll number1,
Enter name: Tom
Enter marks: 98
For roll number2,
Enter name: Jerry
Enter marks: 89
.
.
.
Displaying Information:
Roll number: 1
Name: Tom
Marks: 98
.
.
.
Explanation:
e user and displays it on the screen.
Example: Store Information in Structure and Display it
#include <iostream>
using namespace std;
struct student
{
char name[50];
int roll;
float marks;
} s[10];
int main()
{
cout << "Enter information of students: " << endl;
// storing information
for(int i = 0; i < 10; ++i)
{
s[i].roll = i+1;
cout << "For roll number" << s[i].roll << "," << endl;
cout << "Enter name: ";
cin >> s[i].name;
cout << "Enter marks: ";
cin >> s[i].marks;
cout << endl;
}
cout << "Displaying Information: " << endl;
// Displaying information
for(int i = 0; i < 10; ++i)
{
cout << "\nRoll number: " << i+1 << endl;
cout << "Name: " << s[i].name << endl;
cout << "Marks: " << s[i].marks << endl;
}
return 0;
}
Ответ:
#include <iostream>
using namespace std;
int main()
{
cout<<"Lets learn together C++ program" << endl;
cout<<"It is not so difficult" << endl;
cout<<"I" << endl;
return 0;
}
Ответ: