Conteúdo do Curso
C# Basics
C# Basics
Basic Coding Practice
A number is stored in a variable called num
in the form of a string
. Add 2 to the stored number. You may use the following steps:
- Convert the value of
num
string to an integer and store it in a new integer variable calledtemp
. - Add
2
to the value oftemp
. - Convert the value of
temp
to astring
and assign it to the variablenum
main
- Use
Convert.ToInt32()
andConvert.ToString()
.
main
Tudo estava claro?