|
CS101 ASSIGNMENT NO. 2 SPRING 2022 |
CS101 ASSIGNMENT NO. 2 SPRING 2022 || 100% RIGHT SOLUTION || INTRODUCTION TO COMPUTING || BY VuTech
#include<iostream>
using namespace std;
struct Car
{
char CName[60], CVendor[60], COID[60];
int CModel; int CHPower;
float CPrice;
};
int main()
{
Car car;
cout<<"Enter Car Name: ";
cin>>car.CName;
cout<<"Enter Car Model: ";
cin>>car.CModel;
cout<<"Enter Car Vendor: ";
cin>>car.CVendor;
cout<<"Enter Car Horse Power: ";
cin>>car.CHPower;
cout<<"Enter Car Price: ";
cin>>car.CPrice;
cout<<"Enter Car Owner-Id: ";
cin>>car.COID;
cout<<"Values are stored in Car variable.";
cout<<"\n\n\n"; // for next line or space between 2 lines.
cout<<"The stored vehicle information is:"<<endl;
cout<<"Name: "<<car.CName<<endl;
cout<<"Model: "<<car.CModel<<endl;
cout<<"Vendor: "<<car.CVendor<<endl;
cout<<"Engine Power: "<<car.CHPower<<endl;
cout<<"Price: "<<car.CPrice<<endl;
cout<<"Owner ID: "<<car.COID<<endl;
}
//Solution File is available in description.
//Follow for more updates ---> www.vutechofficial.blogspot.com