Question: Find three C# syntax errors in the code below and rewrite the code in correct way? (4 marks) public class AgeCalc { public static

Find three C# syntax errors in the code below and rewrite the code in correct way? (4 marks) public class

Find three C# syntax errors in the code below and rewrite the code in correct way? (4 marks) public class AgeCalc { public static void Main(string[] args) { } Console.iteLine ("Welcome to my Age Calculator"); Console.Write("What is your year of birth? ") int year=Convert.Toln32(console.ReadLine()); int age=2022-year Console.Write("My age is: "+age);

Step by Step Solution

3.40 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The WriteLine method is misspelled as iteLine The Readline method is misspelled as ReadLine The ConvertToDouble32 method should be ConvertToInt32 beca... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!