Question: The following program has several syntax errors as well as style inconsistencies. Identify a minimum of five syntax errors and three style violations. For an
The following program has several syntax errors as well as style inconsistencies.
Identify a minimum of five syntax errors and three style violations. For an added challenge, correct all errors.
/****************************************
using System;
namespace ErrorExample
{
class ErrorExample
{
static void Main( )
{
int VAL1;
string aValue;
val1 = GETVal1(aValue);
WriteLine("value entered, plus one is {0}",
++val1);
Readkey( );
}
static GETVal1( )
{
Write("Enter a value: ");
aValue = readline( );
val1 = int.Parse(aValue);
return int VAL1;
}
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
