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

1 Expert Approved Answer
Step: 1 Unlock 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 Systems Analysis Design Questions!