C# C# Basics (Retired) Perform Converting Strings to Integers

int.parse

im stuck. can someone help please

CodeChallenge.cs
string heightInput = "168";

int height = int.Parse(heightInput);

Console.WriteLine(height);

Console.WriteLine(height + 10);

can someone help please

Allan Clark
Allan Clark
10,800 Points

get rid of your console.writelines and change it to manipulating the variable.

add 10 the the variable and save it to the variable. This can be done with the += operator. If you are having issues with it please post your code or specific question you are having.

1 Answer

Allan Clark
Allan Clark
10,800 Points

The instructions for the challenge just involve manipulating the variable, you do not need to worry about displaying it to the console. you should be able to accomplish this with the += operator.

thanks. but im yet to know anything about +=operator can you help further