0

please can can someone help me with this when i enter a b c it don't give me s ?

using System; namespace first { class Program { static void Main(string[] args) { int a, b, c,s; Console.WriteLine("Hello World!"); Console.WriteLine("entre A="); a = Convert.ToInt32 (Console.ReadLine()); Console.WriteLine("entre B="); b = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("entre C="); c = Convert.ToInt32(Console.ReadLine()); s = a + b + c; Console.WriteLine("la somme de A+B+C= { 0 }", s); } } }

31st Oct 2020, 8:20 PM
El mhadji Mohamed abdelhak
El mhadji Mohamed abdelhak - avatar
3 Answers
+ 2
In the last Console.WriteLine, remove the spaces before and after the `0` (change "{ 0 }" to "{0}")
31st Oct 2020, 8:31 PM
XXX
XXX - avatar
+ 1
Console.WriteLine(
quot;la somme de A+B+C= {s}");
31st Oct 2020, 8:35 PM
JaScript
JaScript - avatar
0
thanks for the help ^^
31st Oct 2020, 8:38 PM
El mhadji Mohamed abdelhak
El mhadji Mohamed abdelhak - avatar