This is my new program and it is like so killing me I dont understand all those errors I keep getting
// Description: This is program 1 of 3
// Display person name, address, calculated and
// actual cost of car and color of car 3x. 1 using the For Loop, 1
// using While Loop, and 1 using Do While Loop
#include <iostream.h>
#include <string.h>
#include <stdlib.h>
int x;
char st_name;
char st_address;
char st_color;
float f_ccost;
float f_acost;
void getdata();
void processdata();
void putdata();
void main()
{
for(x=0;x<=2;x++)
{
getdata();
processdata();
putdata();
}
}
void getdata()
{
cout << "Please enter your name: ";
cin >> st_name;
cout << "\n\nPlease enter your address: ";
cin >> st_address;
cout << "\n\nPlease enter the amount you paid for your car: ";
cin >> f_acost;
cout << "\n\nPlease enter your car color: ";
cin >> st_color;
}
void processdata()
{
cout << "\n\nCalculated amount of your car is: ";
if(f_acost < 1200)
{
else if(strcmp(st_color,"blue")==0)
{
f_ccost = f_acost * 1.0 +10/100;
cout << f_ccost;
}
else
{
cout << f_acost;
}
else
{
if(f_acost > 1000 && f_acost < 1500)
{
else if(strcmp(st_color,"black")==0)
{
f_ccost = f_acost * 1.0 + 20/100;
cout << f_ccost;
}
else
{
cout << f_acost;
}
else
{
if(f_acost <= 2000)
{
if(strcmp(st_color,"white")==0)
{
f_accost = f_acost - 500.00;
cout << f_ccost;
}
else
{
cout << f_acost;
}
}
}
void putdata()
{
cout << "Person Name: " << st_name;
cout << "\n\nAddress: " << st_address;
cout << setiosflags(ios::fixed)
<< setiosflags(ios::showpoint)
<< setprecision(2);
cout << "\n\nActual Cost of Car: $ " << f_acost;
cout << "\n\nCalculated Cost of Car: $ " << f_ccost;
cout << "\n\nColor of Car: " << st_color;
}
This is what I have so far but I keep getting all kinds of errors