How to make a number like this "07.00"

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.

Can anyone help me please?
I think you mean "output"...anyway, the setprecision manipulator SHOULD work...I've never had a problem with it...can you post your code?
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
#include <iostream>
#include <iomanip>

using namespace::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.
Last edited on
No problem. In fact, I commend you for actually finding stuff out on your own! (Unlike a lot of the people on here...)
Remember to use cin.ignore(); after line 19. Your program will probably go tits up otherwise.
Topic archived. No new replies allowed.