Identify the syntax error(s) (if any) in the following:
Line 1 using System
Line 2 namesspace ExerciseI
Line 3 {
Line 4 Problem2
Line 5 {
Line 6 static Main( )
Line 7 {
Line 8 console.write("ok")
Line 9 }
Line 10 }
Line 11 }
Line 1 has to be changed from using System to using System; (semicolon(;) is missing)
Line 2 has to be changed from namesspace ExerciseI to namespace ExerciseI (spelling of namespace)
Line 4 has to be changed from Problem2 to class Problem2 (class is missing)
Line 6 has to be changed from static Main( ) to static void Main( ) (void is missing)
line 8 has to be changed from console.write("ok") to Console.Write("ok"); (Console is case sensitive and semicolon(;) is missing )
* The error(s) rectified program is
using System;
namespace ExerciseI
{
class Problem2
{
static void Main( )
{
Console.Write("ok");
}
}
}
Output : ok