+ 1
Why isn't this code working??
I am confused and annoyed using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { string yourName; Console.WriteLine("What is your name?"); yourName = Console.ReadLine(); Console.WriteLine("Hello {0}", yourName); string yourAge; Console.WriteLine("how old are you?"); yourAge = Console.ReadLine(); Console.WriteLine("Oh you are {1}", yourAge); } } }
1 Answer
+ 4
It should be
Console.WriteLine("Oh you are {0}", yourAge);
Pay attention to the index 0.
PLEASE LINK YOUR CODE INSTEAD OF PASTING IT IN THE DESCRIPTION. This way, it will be mire readable and people can actually test it