Friday, July 31, 2009

Help! - Visual c#?

Console.WriteLine("They walked past " + c + " ducks . Each child gave " + d + " sweets to each of the ducks and ate one themself. ");


Console.WriteLine("They decided to put the rest into a pile. They counted the pile and found it contained " + g + " sweets. ");


Console.ReadLine();





It says Error Only assignment, call, increment, decrement, and new object expressions can be used as a statement - What shall I do??

Help! - Visual c#?
Not sure about c, but normally you can't add a number to a string. I am guessing c and d refer to numbers. You will need to convert the number to a string value to concatenate the sentence.


No comments:

Post a Comment