I have to make a program where my input should be 07.00 instead of 07:00. I'm talking about any number. I tried using the setprecision manipulator, but it doesn't work.
#include <iostream>
#include <iomanip>
usingnamespace::std;
int main ()//START OF MAIN FUNCTION
{
//RATES
double nights = 0.12, //00:00 - 06:59
days = 0.55, //07:00 - 19:00
evenings = 0.35; //19:01 - 23:59
//The Input Variables
double startTime; //Start time of the Call
int numberMinutes = 0; //Number of Minutes of the Call
cout<<"Enter a number: ";
cin>>startTime;
cout<<endl<<endl;
cout<<setprecision(4)<<startTime<<endl;
system("pause");
return 0;
}//END OF MAIN FUNCTION
My program should recognize my input, w/e the hour is, and it should match the hour with the rate and then multiply the rate times how long the call was. I just need help with making a 0 appear infront of a number.
ETA: You know, I know what to do now. I had misread something in the book. Thanx for the help though.