Professional Documents
Culture Documents
Cs101 Assignment02
Cs101 Assignment02
Cs101 Assignment02
Code:
------------------------------------------------------------------------------------------------------------------------------------------
#include <iostream>
#include <string>
/* run this program using the console pause or add your own getch , system("pause") or input loop*/
struct car
{ string Car_Name;
int Model;
string Vendor;
int Horse_Power;
double Price;
string Owner_Id;
};
car obj;
cin>>obj.Car_Name;
cin>>obj.Model;
cin>>obj.Vendor;
cin>>obj.Price;
cin>>obj.Owner_Id;
cout<<"Name:"<<obj.Car_Name<<endl;
cout<<"Model"<<obj.Model<<endl;
cout<<"Vendor"<<obj.Vendor<<endl;
cout<<"Horse_Power"<<obj.Horse_Power<<endl;
cout<<"Price"<<obj.Price<<endl;
cout<<"Owner_Id"<<obj.Owner_Id<<endl;
return 0;