+ 1
Code Correction
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 name; Console.WriteLine("who are you"); Console.ReadLine(); Console.WriteLine("you are {0}"); } } } // i want to write a code that will ask "who are you" the user will write his name. Then output should be "you are ( the name he put )" What corrections should i do to make it work?
1 Answer
+ 2
hi Raptor Bot
change the Console.ReadLine(); to
string name = Console.ReadLine();
and then change Console.WriteLine(âyou are {0}â); to
Console.WriteLine(âyou are {0}â, name);
if you need any more help with this just ask