+ 2

How to mention a variable in text ?

How to mention a variable in text ? Example: int number1 = 1; int number2 = 2; What is the result of number1 + number2 ? or What is the result of 1 + 2 ? Thanks.

23rd Dec 2017, 11:48 PM
Tennouji Kotarou
Tennouji Kotarou - avatar
4 Answers
+ 2
using System; class MainClass { public static void Main (string[] args) { int number1 = 1; int number2 = 2; Console.WriteLine("What is the result of {0} + {1}?", number1, number2); } }
24th Dec 2017, 1:46 AM
aklex
aklex - avatar
+ 3
Thanks *-*
24th Dec 2017, 2:18 AM
Tennouji Kotarou
Tennouji Kotarou - avatar
+ 2
C# sorry
24th Dec 2017, 12:47 AM
Tennouji Kotarou
Tennouji Kotarou - avatar
+ 1
You didn't tell us which language
24th Dec 2017, 12:46 AM
aklex
aklex - avatar