Answer to Question #312216 in Management for Zack

Question #312216

This program will allow users to input personal information, the destination code and

quantity of tickets. This program should display the details of the chosen

destination/destinations once booking is completed. Due to the pandemic of Covid 19,

Selangor Airways will give a 10% discount for users with a total price more than

RM500.00.

(Note: Display an error message for any invalid destination code).


1
Expert's answer
2022-03-16T14:01:03-0400
#include <iostream>
using namespace std;

struct student
{
    char name[50];
    int mobile;
    float code;
} s[10];

int main()
{
    cout << "Enter  name: " << endl;

    // storing information
    for(int i = 0; i < 10; ++i)
    {
        s[i].roll = i+1;
        cout << "For mobile" << 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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS