1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
|
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main (int argc)
{
int type;
int vehicleType;
int passengerCar;
int truckVan;
int newlyPurchased;
long int yearPurchased;
long int day;
int electric;
int choice;
long int year;
long long int VIN;
long long int price;
long long int depreciationYear = 2013;
string makemodelcolor;
string month;
cout << "Car Depreciation Values For Epona's Estranged Earrings\n\n";
cout << "What year was this vehicle purchased?\n\n";
cin >> yearPurchased;
if (yearPurchased != 2013)
{
cout << "I'm sorry, but this program only works for vehicles purchased in 2013.\n\n";
system("PAUSE");
return 0;
}
cout << "Hello, what kind of car would you like to calculate the depreciation of? Please enter its repsective number.\n\n";
cout <<"Please select the vehicle: \n\n"
"1) Passenger Car: (new) 2013 Volvo C70 $41,200 \n"
"2) Passenger Car: (Used) 2012 Nissan Versa S $13,892 \n"
"3) SUV: (New) 2014 Honda Pilot $33,520 \n"
"4) Truck: (New) 2015 Chevrolet Truck Silverado 3500HD Crew Cab 4WD $41,045 \n"
"5) Van: (Used) 2011 Honda Odyssey EX $27,900 \n"
"6) Other Truck/Van (You will have to enter values manually) \n"
"7) Other Passenger Car (You will have to enter values manually) \n";
cin >> choice;
if (choice == 1)
{
price = 41,200;
cout << "What is the car's VIN number?\n";
cin >> VIN;
cout << "In which month did you purchase this car?\n";
cin >> month;
cout << "On which day of that month did you purchase this car?\n\n";
cin >> day;
cout << "Report for Epona's Estranged Earrings. \n 2013 Volvo C70: White, " << VIN << ", new, purchased " << month << " " << day << ". 2013.\n\n";
cout << "______________________________________________\n";
cout << "| Tax Year | Max Depreciation | New Value |\n";
cout << "|---------------------------------------------|\n";
price = price - 11,160;
cout << "| " << depreciationYear << " | 11,160 | " << price << " |\n";
cout << "|---------------------------------------------|\n";
depreciationYear = depreciationYear + 1;
price = price - 5,100;
cout << "| " <<depreciationYear << " | 5,100 | " << price << " |\n";
cout << "|---------------------------------------------|\n";
depreciationYear = depreciationYear + 1;
price = price - 3,050;
cout << "| " <<depreciationYear << " | 3,050 | " << price << " |\n";
cout << "|---------------------------------------------|\n";
do
{
depreciationYear = depreciationYear + 1;
price = price - 1,875;
cout << "| " <<depreciationYear << " | 1,875 | " << price << " |"<< endl;
cout << "|---------------------------------------------|\n";
}
while (price >= 1);
}
else if (choice == 2)
{
price = 13,892;
cout << "What is the car's VIN number?\n";
cin >> VIN;
cout << "In which month did you purchase this car?\n";
cin >> month;
cout << "On which day of that month did you purchase this car?\n\n";
cin >> day;
cout << "Report for Epona's Estranged Earrings. \n 2012 Nissan Versa S: Silver, " << VIN << ", used, purchased " << month << " " << day << ". 2013.\n\n";
cout << "______________________________________________\n";
cout << "| Tax Year | Max Depreciation | New Value |\n";
cout << "|---------------------------------------------|\n";
price = price - 11,160;
cout << "| " << depreciationYear << " | 11,160 | " << price << " |\n";
cout << "|---------------------------------------------|\n";
depreciationYear = depreciationYear + 1;
price = price - 5,100;
cout << "| " <<depreciationYear << " | 5,100 | " << price << " |\n";
cout << "|---------------------------------------------|\n";
}
else if (choice == 3)
{
price = 33,520;
cout << "What is the car's VIN number?\n";
cin >> VIN;
cout << "In which month did you purchase this car?\n";
cin >> month;
cout << "On which day of that month did you purchase this car?\n\n";
cin >> day;
cout << "Report for Epona's Estranged Earrings. \n 2014 Honda Pilot: White, " << VIN << ", used, purchased " << month << " " << day << ". 2013.\n\n";
cout << "______________________________________________\n";
cout << "| Tax Year | Max Depreciation | New Value |\n";
cout << "|---------------------------------------------|\n";
price = price - 11,160;
cout << "| " << depreciationYear << " | 11,160 | " << price << " |\n";
cout << "|---------------------------------------------|\n";
depreciationYear = depreciationYear + 1;
price = price - 5,100;
cout << "| " <<depreciationYear << " | 5,100 | " << price << " |\n";
cout << "|---------------------------------------------|\n";
depreciationYear = depreciationYear + 1;
price = price - 3,050;
cout << "| " <<depreciationYear << " | 3,050 | " << price << " |\n";
cout << "|---------------------------------------------|\n";
do
{
depreciationYear = depreciationYear + 1;
price = price - 1,875;
cout << "| " <<depreciationYear << " | 1,875 | " << price << " |"<< endl;
cout << "|---------------------------------------------|\n";
}
while (price >= 1);
}
else if (choice == 4)
{
}
else if (choice == 5)
{
}
else if (choice == 6)
{
vehicleType = truckVan;
}
else if (choice == 7)
{
vehicleType = passengerCar;
}
else
{
cout << "Please enter 1, 2, 3, 4, 5, 6, or 7 to select a vehicle.\n\n";
}
system("PAUSE");
return 0;
}
|