cs101 Ass 02
cs101 Ass 02
ASSIGNMENT-02
CS101( Introduction to Computer )
NAME: Umar Farooq VU ID: bc220204062
Code Solution:
#include <iostream>
#include <string>
using namespace std;
cout << "Enter Car Name: "; //Taking inputs from the user
cin >> Car1.car_name;
cout << "Enter Car Model: ";
cin >> Car1.car_model;
cout << "Enter Car Vendor: ";
cin >> Car1.car_vendor;
cout << "Enter Car Horse Power: ";
cin >> Car1.car_horse_power;
cout << "Enter Car Price: ";
cin >> Car1.car_price;
cout << "Enter Car Owner-ID: ";
cin >> Car1.car_owner_ID;
cout << "Values are stored in Car1 variable." << endl << endl << endl;
cout << "The stored vehicle information is:" << endl; //Showing output
on the screen
cout << "Name:\t\t" << Car1.car_name << endl;
cout << "Model:\t\t" << Car1.car_model << endl;
cout << "Vendor:\t\t" << Car1.car_vendor << endl;
cout << "Horse Power:\t" << Car1.car_horse_power << endl;
cout << "Price:\t\t" << Car1.car_price << endl;
cout << "Owner-ID:\t" << Car1.car_owner_ID << endl << endl;
return 0;
}
Output Screenshot