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); } } }
3 odpowiedzi
+ 2
In the last Console.WriteLine, remove the spaces before and after the `0` (change "{ 0 }" to "{0}")
+ 1
Console.WriteLine(quot;la somme de A+B+C= {s}");
0
thanks for the help ^^