I'm having some issues with adding in C#, I keep getting errors saying "sum does not exist in the class or namespace". I can't seem to get the values to add and get an average.
2006-11-12
14:52:45
·
2 answers
·
asked by
Christina
2
in
Computers & Internet
➔ Programming & Design
Here is the code I am writing:
public class testScores
{
public static void Main()
{
int value1 = 95,
value2 = 98,
value3 = 99,
value4 = 100,
value5 = 89;
Console.WriteLine ("The sum of {0},{1},{2},{3},{4} is {5}",value1,value2,value3,value4,value5,sum);
2006-11-12
15:04:52 ·
update #1