Hello! I am working on my project..my code looks fine but I always get a wrong output. For example: I enter 11 for hour, 05 for minutes. The output should be display 11:05...but anyway it shows me 11:5
The zero is gone?? Is there anything i'm missing?? Please let me know how to fix this issue...thanks in advance
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int hour;
int minutes;
cout << " Enter the time.\n ";
cin >> hour;
cin >> minutes;
cout << hour << ":" << minutes << endl;
return 0;
}