using A = System.Console;
public void point()
{
int hour, minute;
A.Write("Enter Time (HH:MM) = ");
hour = A.Read();
A.Write(":");
minute = A.Read();
}
I want it to be like
"Enter Time (HH:MM) = 12(hour input):49(minute input)"
but it coming like
"Enter Time (HH:MM) = 12(hour input)
:49(minute input)
Simplest way (assuming you are reading from Console, and user will enter hour then press
Enter, then enter minute and pressEnter):Output:
Though I would rather recommend you better and less error prone way like this (where user inputs HH:MM and presses
Entera single time i.e. enters a single string including:i.e. colon):