I cant round up minutes and switch them to hours?...for example if a car was parked for 241 minutes(input has to be in minutes) and rate was $2/hour and first 120 minutes were free i would need to charge for 5h and i dont know how to round up right so i could charge for 5h. please helpp.
so far
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
//local constants
const char CAR = 'C';
const char TRUCK = 'T';
//local variables
char type; //Car or truck
int num; //Minutes parked
float total; //Total
/**************************start main program*********************/
//Input whether its car or truck
cout << "\n\n";
cout << setw(45) << "-------------------------------" << endl;
cout << setw(45) << "Cost of Parking on OnCenter lot" << endl;
cout << setw(45) << "-------------------------------" << endl;
cout << setw(45) << "Vehicle Type (T for Truck C for Car): " << endl;
cin >> type;
if (type == 'C')
{
cout << setw(45) << " Minutes Parked: ";
cin >> num;
}
if ( num <= 120 )
cout << setw(45) << " No Fee ";
else if ( num > 120 )