I don't know how to get the programs to call each other, please help me.
#include<iostream>
using namespace std;
int intro() {
cout<<"The first 30 minutes you are here cost $0.50.";
cout<<"Through the first 8 hours $0.35 cents will be charged every 30 minutes";
cout<<"After the first 8 hours $0.25 cents will be charged each additional 30 minutes until you have left";
}
void getinfo() {
int min;
cout<<"How many minutes have you been parked here?";
cin>>min;
}
int calc(min){
double cost;
double mc;
min=mc;
if (mc <= 30)
cost = 0.50;
else if (mc <= 480)
cost = 0.50 + (((mc / 30) - 1) * 0.35);
else if (mc > 480)
cost = 5.75 + (((mc - 480) / 30) * 0.25);
}
int main(){
int min;
double cost;
cout<<"welcome to the parking garage!";
int intro();
void getinfo();
int calc();
cout<< "you've been parked here "<< min<< "minutes,"<<"the fee is $ "<<cost;
If min = 128, min / 30 = 4.26666. You want to charge them for 2 1/2 hours, not 2 hours and not 2 hours and 26 minutes because you're charging them by half-hours. ceil just rounds the number up. Ex: ceil(4.2666) would equal 5 half-hours (or 2 1/2 hours)
And you have to make min a double for this to work.