A X

A X

  • NA
  • 18
  • 8.6k

Whats wrong with my code?

Aug 29 2013 4:12 PM
hello i am just practicing this code but it wont execute. there is a squiggly line under PARSE can somebody help me please?





namespace practice_for_me
{
class Program
{
static void Main(string[] args)
{

string ampm;
int h, m;
Console.Write("Please enter the hour : ");
h= Int32.Parse.Console.ReadLine();
Console.Write("Please enter the minutes : ");
m = Int32.Parse.Console.ReadLine();
Console.Write("Is it am or pm?:");
ampm = Console.ReadLine();

if (ampm == "pm")

h = h + 12;

Console.Write("The military time of the information entered is : " + h + ":" + m + ampm);

}

}
}

Answers (1)