Advertisement
KodingKid

How to use if and else in C# - Basic Scripting #39

Jul 8th, 2021
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. using System;
  2. namespace input
  3. {
  4.     class MyProgram
  5.     {
  6.         static void Main(string[] args)
  7.         {
  8.             input = Console.ReadLine();
  9.             Console.WriteLine("Please type 1");
  10.             if input == "1"
  11.                 Console.WriteLine("Well done!");
  12.             if else
  13.                 Console.WriteLine("Please type 1");
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement