0

C# program

Hepl me please,hwo to do -> write a c# program if the user enter 1 ,print sunday.

8th Jan 2024, 7:25 AM
ranoo muhamad
2 ответов
+ 8
ranoo muhamad welcome to Sololearn! There is a Sololearn tutorial that will help you get started learning C#. You can find it in the app under the Learn tab. Here is a link: https://www.sololearn.com/learn/courses/c-sharp-introduction
8th Jan 2024, 8:21 AM
Brian
Brian - avatar
+ 1
using System; class Program { static void Main() { Console.WriteLine("Enter a number:"); int userInput = Convert.ToInt32(Console.ReadLine()); if (userInput == 1) { Console.WriteLine("Sunday"); } else { Console.WriteLine("Invalid input. Please enter 1 for Sunday."); } } }
10th Jan 2024, 7:34 AM
Joseph Joseph
Joseph Joseph - avatar