Advertisement
KodingKid

C# Magic 8-Ball Random-Generator

Aug 13th, 2021
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1. using System;
  2. public class Program {
  3.    public static void Main() {
  4.       Console.WriteLine("Think of a question; and you shall get an answer.")
  5.       Random randomVariable = new Random();
  6.       int randomGenerate= randomVariable.Next(1,8);
  7.        if (randomGenerate == 1)
  8.            Console.WriteLine("Yes");
  9.        if (randomGenerate == 2)
  10.            Console.WriteLine("No");
  11.        if (randomGenerate == 3)
  12.            Console.WriteLine("Maybe");
  13.        if (randomGenerate == 4)
  14.            Console.WriteLine("Error");
  15.        if (randomGenerate == 5)
  16.            Console.WriteLine("lol idk");
  17.        if (randomGenerate == 6)
  18.            Console.WriteLine("Most likely");
  19.        if (randomGenerate == 7)
  20.            Console.WriteLine("Most unlikely");
  21.        if (randomGenerate == 8)
  22.            Console.WriteLine("Come again?");
  23.        //this is my first non-python script in ages lol
  24.    }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement