Advertisement
Guest User

Untitled

a guest
May 8th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 24.14 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading;
  6. using System.IO;
  7.  
  8. namespace Custom
  9. {
  10.     class Program
  11.     {
  12.  
  13.         // Definere paths til permanente txt hukommelse
  14.         static string userpath = @"C:\Users\Tobias\source\repos\Password\Password\Resources\Username.txt";
  15.         static string firstpath = @"C:\Users\Tobias\source\repos\Password\Password\Resources\Bools\Firststartup.txt";
  16.         static string passpath = @"C:\Users\Tobias\source\repos\Password\Password\Resources\Password.txt";
  17.         static string colorpath = @"C:\Users\Tobias\source\repos\Password\Password\Resources\Color.txt";
  18.  
  19.         //Note paths txt
  20.  
  21.         static string Note1path = @"C:\Users\Tobias\source\repos\Password\Password\Resources\Notes\Note1.txt";
  22.         static string Note2path = @"C:\Users\Tobias\source\repos\Password\Password\Resources\Notes\Note2.txt";
  23.         static string Note3path = @"C:\Users\Tobias\source\repos\Password\Password\Resources\Notes\Note3.txt";
  24.         static string Note4path = @"C:\Users\Tobias\source\repos\Password\Password\Resources\Notes\Note4.txt";
  25.         static string Note5path = @"C:\Users\Tobias\source\repos\Password\Password\Resources\Notes\Note5.txt";
  26.  
  27.  
  28.  
  29.         //Sætter strings til txt filers indhold
  30.         static string Firsttime = File.ReadAllText(firstpath);
  31.         static string Username = File.ReadAllText(userpath);
  32.         static string Password = File.ReadAllText(passpath);
  33.  
  34.  
  35.         static string Note1txt = File.ReadAllText(Note1path);
  36.         static string Note2txt = File.ReadAllText(Note2path);
  37.         static string Note3txt = File.ReadAllText(Note3path);
  38.         static string Note4txt = File.ReadAllText(Note4path);
  39.         static string Note5txt = File.ReadAllText(Note5path);
  40.  
  41.         static string colorSelected = File.ReadAllText(colorpath);
  42.  
  43.         static bool dowhile = false;
  44.  
  45.  
  46.         //Hemmeligt keyword for at troubleshoot password
  47.         static string sendnudes = "69 1337";
  48.  
  49.         //Universal input readline string
  50.         static string input;
  51.  
  52.  
  53.         static void colorChosen()
  54.         {
  55.             switch (colorSelected)
  56.             {
  57.                 case "1":
  58.                     Console.ForegroundColor = ConsoleColor.White;
  59.                     Console.Clear();
  60.                     break;
  61.                 case "2":
  62.                     Console.ForegroundColor = ConsoleColor.Blue;
  63.                     Console.Clear();
  64.                     break;
  65.                 case "3":
  66.                     Console.ForegroundColor = ConsoleColor.Red;
  67.                     Console.Clear();
  68.                     break;
  69.                 case "4":
  70.                     Console.ForegroundColor = ConsoleColor.Green;
  71.                     Console.Clear();
  72.                     break;
  73.                 case "5":
  74.                     Console.ForegroundColor = ConsoleColor.Yellow;
  75.                     Console.Clear();
  76.                     break;
  77.  
  78.  
  79.                 default:
  80.                     break;
  81.             }
  82.  
  83.  
  84.         }
  85.  
  86.  
  87.  
  88.         static void Loading()
  89.         {
  90.             colorChosen();
  91.             Console.BackgroundColor = ConsoleColor.Black;
  92.             Console.CursorVisible = false;
  93.             Console.SetCursorPosition(1, 1);
  94.  
  95.             for (int i = 0; i <= 100; i++)
  96.             {
  97.                 for (int y = 0; y < i; y++)
  98.                 {
  99.                     Console.Write("█");
  100.                 }
  101.                 Console.WriteLine(i + "/100");
  102.                 Console.SetCursorPosition(1, 1);
  103.                 System.Threading.Thread.Sleep(51);
  104.  
  105.             }
  106.             Console.WriteLine("LOADING COMPLETE!");
  107.             Thread.Sleep(869);
  108.             Console.Clear();
  109.             Console.CursorVisible = true;
  110.         }
  111.  
  112.         static void Getinput()
  113.         {
  114.             input = Convert.ToString(Console.ReadKey().KeyChar);
  115.         }
  116.  
  117.  
  118.         static void Firststartup()
  119.         {
  120.  
  121.  
  122.  
  123.             Console.WriteLine("Thank you for using KAB OS 1.0!\n" +
  124.                 "Press F11 for full experience\n" +
  125.                 "We see that this is the first time you started the program.\n" +
  126.                 "We will now open a first time setup.\n" +
  127.                 "You can edit your username and password at any time by pressing 0 in the menu!\n" +
  128.                 "Press any key to continue . . .");
  129.             Console.ReadKey();
  130.  
  131.             Console.Clear();
  132.             Console.WriteLine("What new username do you want?");
  133.             File.WriteAllText(userpath, Console.ReadLine());
  134.             Console.WriteLine("Your username has now been set!\nPress any button to continue . . .");
  135.             Console.ReadKey();
  136.  
  137.             Console.Clear();
  138.             Console.WriteLine("What password do you want?");
  139.             File.WriteAllText(passpath, Console.ReadLine());
  140.             Console.WriteLine("Your password has now been set!\nPress any button to continue . . .");
  141.             Console.ReadKey();
  142.  
  143.  
  144.             Console.Clear();
  145.             Console.WriteLine("What color would you like your theme to be?" +
  146.         "\n" +
  147.         "1. White" +
  148.         "\n" +
  149.         "2. Blue" +
  150.         "\n" +
  151.         "3. Red" +
  152.         "\n" +
  153.         "4. Green" +
  154.         "\n" +
  155.         "5. Yellow" +
  156.         "\n" +
  157.  
  158.         "E. Exit");
  159.             Getinput();
  160.  
  161.             switch (input)
  162.             {
  163.                 case "1":
  164.                     File.WriteAllText(colorpath, "1");
  165.                     break;
  166.                 case "2":
  167.                     File.WriteAllText(colorpath, "2");
  168.                     break;
  169.                 case "3":
  170.                     File.WriteAllText(colorpath, "3");
  171.                     break;
  172.                 case "4":
  173.                     File.WriteAllText(colorpath, "4");
  174.                     break;
  175.                 case "5":
  176.                     File.WriteAllText(colorpath, "5");
  177.                     break;
  178.  
  179.  
  180.  
  181.  
  182.                 default:
  183.                     break;
  184.             }
  185.  
  186.             colorSelected = File.ReadAllText(colorpath);
  187.             colorChosen();
  188.  
  189.  
  190.  
  191.             Firsttime = File.ReadAllText(firstpath);
  192.             Username = File.ReadAllText(userpath);
  193.             Password = File.ReadAllText(passpath);
  194.  
  195.  
  196.  
  197.             File.WriteAllText(firstpath, "1");
  198.             Menu();
  199.         }
  200.  
  201.         static void SettingsChange()
  202.         {
  203.             Console.Clear();
  204.             Console.WriteLine("What setting would you like to change?" +
  205.                 "\n" +
  206.                 "1. Password" +
  207.                 "\n" +
  208.                 "2. Username" +
  209.                 "\n" +
  210.                 "3. Change theme" +
  211.                 "\n" +
  212.                 "F. Factoryreset" +
  213.                 "\n" +
  214.                 "E. Exit");
  215.             Getinput();
  216.             switch (input)
  217.             {
  218.                 case "1":
  219.                     Console.Clear();
  220.                     Console.WriteLine("Welcome To the Password-changing\nWhat new password do you want?");
  221.                     File.WriteAllText(passpath, Console.ReadLine());
  222.                     Console.WriteLine("Your password has now been changed!\nPress any button to continue . . .");
  223.                     break;
  224.                 case "2":
  225.                     Console.Clear();
  226.                     Console.WriteLine("Welcome To the Username-changing\nWhat new username do you want?");
  227.                     File.WriteAllText(userpath, Console.ReadLine());
  228.                     Console.WriteLine("Your username has now been changed!\nPress any button to continue . . .");
  229.                     Username = File.ReadAllText(userpath);
  230.  
  231.                     break;
  232.  
  233.  
  234.                 case "3":
  235.                     Console.Clear();
  236.                     Console.WriteLine("What color would you like your theme to be?" +
  237.                 "\n" +
  238.                 "1. White" +
  239.                 "\n" +
  240.                 "2. Blue" +
  241.                 "\n" +
  242.                 "3. Red" +
  243.                 "\n" +
  244.                 "4. Green" +
  245.                 "\n" +
  246.                 "5. Yellow" +
  247.                 "\n" +
  248.  
  249.                 "E. Exit");
  250.                     Getinput();
  251.  
  252.                     switch (input)
  253.                     {
  254.                         case "1":
  255.                             File.WriteAllText(colorpath, "1"); colorChosen();
  256.                             break;
  257.                         case "2":
  258.                             File.WriteAllText(colorpath, "2");
  259.  
  260.                             break;
  261.                         case "3":
  262.                             File.WriteAllText(colorpath, "3");
  263.  
  264.                             break;
  265.                         case "4":
  266.                             File.WriteAllText(colorpath, "4");
  267.  
  268.                             break;
  269.                         case "5":
  270.                             File.WriteAllText(colorpath, "5");
  271.  
  272.                             break;
  273.  
  274.  
  275.                         default:
  276.                             break;
  277.                     }
  278.                     colorSelected = File.ReadAllText(colorpath);
  279.                     colorChosen();
  280.  
  281.                     break;
  282.                 case "f":
  283.                 case "F":
  284.                     Console.Clear();
  285.                     Console.WriteLine("Are you sure you want to factory reset" +
  286.                         "\n" +
  287.                         "Y/N?");
  288.                     Getinput();
  289.                     if (input == "Y" || input == "y")
  290.                     {
  291.                         File.WriteAllText(firstpath, "0");
  292.                         Console.Clear();
  293.                         Console.WriteLine("Your pc will now shutdown . . .");
  294.                         System.Threading.Thread.Sleep(1500);
  295.                         Environment.Exit(0);
  296.                     }
  297.                     break;
  298.                 case "e":
  299.                 case "E":
  300.                     Menu();
  301.                     break;
  302.                 default:
  303.                     SettingsChange();
  304.                     break;
  305.             }
  306.         }
  307.  
  308.         static void Main(string[] args)
  309.         {
  310.  
  311.             Console.Title = "KAB OS 1.0";
  312.  
  313.             colorChosen();
  314.  
  315.             //Remove scrollbar
  316.             Console.BufferWidth = Console.WindowWidth = 125;
  317.             Console.BufferHeight = Console.WindowHeight;
  318.  
  319.  
  320.  
  321.             //Permanent colorsets
  322.             Console.BackgroundColor = ConsoleColor.Black;
  323.             Console.Clear();
  324.  
  325.             if (Firsttime == "0")
  326.             {
  327.                 // Default color
  328.                 File.WriteAllText(colorpath, "4");
  329.                 colorSelected = File.ReadAllText(colorpath);
  330.                 colorChosen();
  331.             }
  332.  
  333.             Loading();
  334.  
  335.  
  336.             //Checks for first time launch
  337.             if (Firsttime == "0")
  338.             {
  339.                 // Default color
  340.                 File.WriteAllText(colorpath, "4");
  341.                 colorSelected = File.ReadAllText(colorpath);
  342.                 colorChosen();
  343.  
  344.                 Firststartup();
  345.             }
  346.             else
  347.             {
  348.                 Console.Write("Welcome to KAB OS 0.1 Beta {0}!" +
  349.                     "\n" +
  350.                     "You will need to enter a password to use the OS" +
  351.                     "\n" +
  352.                     "Press F11 for full experience\n", Username);
  353.             }
  354.  
  355.             //Goto for secret code
  356.             do
  357.             {
  358.  
  359.  
  360.             Console.WriteLine("\nEnter Password: ");
  361.             input = Console.ReadLine();
  362.  
  363.  
  364.             if (input == Password)
  365.             {
  366.                 Console.WriteLine("Welcome!");
  367.                 Menu();
  368.             }
  369.  
  370.             else if (input == sendnudes)
  371.             {
  372.                 Console.WriteLine(Password.ToString());
  373.  
  374.             }
  375.  
  376.             else
  377.             {
  378.                 Console.Clear();
  379.                 Console.WriteLine("Wrong password\nEnter to try again!");
  380.             }
  381.  
  382.             } while (true);
  383.         }
  384.  
  385.         static void Menu()
  386.         {
  387.  
  388.             Console.Clear();
  389.             Console.WriteLine("Hello {0}" +
  390.                 "\n" +
  391.                 "Enter the number to access the desired program" +
  392.                 "\n" +
  393.                 "0. Change Settings" +
  394.                 "\n" +
  395.                 "1. Games" +
  396.                 "\n" +
  397.                 "2. Notes" +
  398.                 "\n" +
  399.                 "E. To exit", Username);
  400.             Getinput();
  401.             switch (input)
  402.             {
  403.                 case "0":
  404.                     Console.Clear();
  405.                     SettingsChange();
  406.                     Menu();
  407.                     break;
  408.                 case "1":
  409.                     Console.Clear();
  410.                     Gamemenu();
  411.                     Menu();
  412.                     break;
  413.                 case "2":
  414.                     Console.Clear();
  415.                     Notes();
  416.                     Menu();
  417.                     break;
  418.                 case "3":
  419.                     Calculator();
  420.                     break;
  421.                 case "4":
  422.                 case "5":
  423.                 case "6":
  424.                 case "7":
  425.                 case "8":
  426.                 case "9":
  427.                     break;
  428.                 case "e":
  429.                 case "E":
  430.                 case "q":
  431.                 case "Q":
  432.                     Console.WriteLine("\n");
  433.                     Environment.Exit(0);
  434.                     break;
  435.  
  436.                 default:
  437.                     Menu();
  438.                     break;
  439.             }
  440.         }
  441.  
  442.         static void Notes()
  443.         {
  444.  
  445.  
  446.             Console.WriteLine("What note do you want to Interact with?" +
  447.                 "\n" +
  448.                 "1. Note" +
  449.                 "\n" +
  450.                 "2. Note" +
  451.                 "\n" +
  452.                 "3. Note" +
  453.                 "\n" +
  454.                 "4. Note" +
  455.                 "\n" +
  456.                 "5. Note");
  457.  
  458.  
  459.             Getinput();
  460.  
  461.             switch (input)
  462.             {
  463.                 case "1":
  464.                     Console.Clear();
  465.                     Console.WriteLine("If you do not write anything your note will stay the same");
  466.                     Console.WriteLine(Note1txt);
  467.                     input = Console.ReadLine();
  468.                     if (input != "")
  469.                     {
  470.                         File.WriteAllText(Note1path, input);
  471.                     }
  472.                     break;
  473.                 case "2":
  474.                     Console.Clear();
  475.                     Console.WriteLine("If you do not write anything your note will stay the same");
  476.                     Console.WriteLine(Note2txt);
  477.                     input = Console.ReadLine();
  478.                     if (input != "")
  479.                     {
  480.                         File.WriteAllText(Note2path, input);
  481.                     }
  482.                     break;
  483.                 case "3":
  484.                     Console.Clear();
  485.                     Console.WriteLine("If you do not write anything your note will stay the same");
  486.                     Console.WriteLine(Note3txt);
  487.                     input = Console.ReadLine();
  488.                     if (input != "")
  489.                     {
  490.                         File.WriteAllText(Note3path, input);
  491.                     }
  492.                     break;
  493.                 case "4":
  494.                     Console.Clear();
  495.                     Console.WriteLine("If you do not write anything your note will stay the same");
  496.                     Console.WriteLine(Note4txt);
  497.                     input = Console.ReadLine();
  498.                     if (input != "")
  499.                     {
  500.                         File.WriteAllText(Note4path, input);
  501.                     }
  502.                     break;
  503.                 case "5":
  504.                     Console.Clear();
  505.                     Console.WriteLine("If you do not write anything your note will stay the same");
  506.                     Console.WriteLine(Note5txt);
  507.                     input = Console.ReadLine();
  508.                     if (input != "")
  509.                     {
  510.                         File.WriteAllText(Note5path, input);
  511.                     }
  512.                     break;
  513.  
  514.                 default:
  515.                     Console.Clear();
  516.                     Notes();
  517.                     break;
  518.             }
  519.             Note1txt = File.ReadAllText(Note1path);
  520.             Note2txt = File.ReadAllText(Note2path);
  521.             Note3txt = File.ReadAllText(Note3path);
  522.             Note4txt = File.ReadAllText(Note4path);
  523.             Note5txt = File.ReadAllText(Note5path);
  524.  
  525.         }
  526.  
  527.  
  528.         static void Gamemenu()
  529.         {
  530.  
  531.             Console.Clear();
  532.             Console.WriteLine("Hello {0}" +
  533.                 "\n" +
  534.                 "Enter the number to access the desired game!" +
  535.                 "\n" +
  536.                 "" +
  537.                 "\n" +
  538.                 "1. Math-Games!" +
  539.                 "\n" +
  540.                 "E. To exit", Username);
  541.             Getinput();
  542.             switch (input)
  543.             {
  544.                 case "0":
  545.                 case "1":
  546.                     Console.Clear();
  547.                     Mathgame();
  548.                     break;
  549.                 case "2":
  550.                 case "3":
  551.                 case "4":
  552.                 case "5":
  553.                 case "6":
  554.                 case "7":
  555.                 case "8":
  556.                 case "9":
  557.                     break;
  558.                 case "e":
  559.                 case "E":
  560.                 case "q":
  561.                 case "Q":
  562.                     Menu();
  563.                     break;
  564.  
  565.                 default:
  566.                     Mathgame();
  567.                     break;
  568.             }
  569.  
  570.  
  571.         }
  572.         static void Mathgame()
  573.         {
  574.             Console.Clear();
  575.  
  576.             Console.Title = "Math-Game";
  577.             do
  578.             {
  579.  
  580.             Console.WriteLine("Velkommen til matematik spillet" +
  581.                 "\n" +
  582.                 "Hvilket spil kunne du tænke dig at spille?" +
  583.                 "\n" +
  584.                 "1. Plus-Spil" +
  585.                 "\n" +
  586.                 "2. Minus-Spil" +
  587.                 "\n" +
  588.                 "3. Gange-Spil" +
  589.                 "\n" +
  590.                 "E. To exit");
  591.             Getinput();
  592.  
  593.             switch (input)
  594.             {
  595.                 case "1":
  596.                     Console.Clear();
  597.                     plusgame();
  598.                     Mathgame();
  599.                     break;
  600.  
  601.                 case "2":
  602.                     Console.Clear();
  603.                     minusgame();
  604.                     Mathgame();
  605.                     break;
  606.  
  607.                 case "3":
  608.                     Console.Clear();
  609.                     multigame();
  610.                     Mathgame();
  611.                     break;
  612.  
  613.                 case "e":
  614.                 case "E":
  615.                     Menu();
  616.                     break;
  617.  
  618.                 default:
  619.                     Console.Clear();
  620.                         break;
  621.             }
  622.             } while (true);
  623.  
  624.             Console.ReadKey();
  625.         }
  626.         static void plusgame()
  627.  
  628.         {
  629.             int Spørgnr = 1;
  630.             int Rigtignr = 0;
  631.  
  632.             do
  633.             {
  634.  
  635.  
  636.             Random rnd = new Random();
  637.             int nr1 = rnd.Next(1, 100);
  638.             int nr2 = rnd.Next(1, 100);
  639.  
  640.             Console.WriteLine("Spørgsmål nr {0}, du har {1} rigtige" +
  641.                 "\n" +
  642.                 "Hvad er {2} + {3}?" +
  643.                 "\n" +
  644.                 "Skriv exit for at lukke spillet", Spørgnr, Rigtignr, nr1, nr2);
  645.             input = Console.ReadLine();
  646.  
  647.             if (input == Convert.ToString(nr1 + nr2))
  648.             {
  649.                 Console.WriteLine("Det er nemlig rigtigt!");
  650.                 System.Threading.Thread.Sleep(2000);
  651.                 Console.Clear();
  652.                 Spørgnr++;
  653.                 Rigtignr++;
  654.                
  655.             }
  656.             else if (input == "exit" || input == "Exit")
  657.             {
  658.                     dowhile = true;
  659.             }
  660.  
  661.             else
  662.             {
  663.                 Console.WriteLine("Fejl");
  664.                 System.Threading.Thread.Sleep(2000);
  665.                 Console.Clear();
  666.                 Spørgnr++;
  667.                
  668.             }
  669.             } while (dowhile == false);
  670.             dowhile = false;
  671.         }
  672.         static void minusgame()
  673.  
  674.         {
  675.             int Spørgnr = 1;
  676.             int Rigtignr = 0;
  677.  
  678.             do
  679.             {
  680.  
  681.             Random rnd = new Random();
  682.             int nr1 = rnd.Next(1, 100);
  683.             int nr2 = rnd.Next(1, 100);
  684.  
  685.             Console.WriteLine("Spørgsmål nr {0}, du har {1} rigtige" +
  686.                 "\n" +
  687.                 "Hvad er {2} - {3}?" +
  688.                 "\n" +
  689.                 "Skriv exit for at lukke spillet", Spørgnr, Rigtignr, nr1, nr2);
  690.             input = Console.ReadLine();
  691.  
  692.             if (input == Convert.ToString(nr1 - nr2))
  693.             {
  694.                 Console.WriteLine("Det er nemlig rigtigt!");
  695.                 System.Threading.Thread.Sleep(2000);
  696.                 Console.Clear();
  697.                 Spørgnr++;
  698.                 Rigtignr++;
  699.             }
  700.             else if (input == "exit" || input == "Exit")
  701.             {
  702.  
  703.             }
  704.             else
  705.             {
  706.                 Console.WriteLine("Fejl");
  707.                 System.Threading.Thread.Sleep(2000);
  708.                 Console.Clear();
  709.                 Spørgnr++;
  710.             }
  711.         } while (dowhile == false);
  712.             dowhile = false;
  713.         }
  714.         static void multigame()
  715.  
  716.         {
  717.             int Spørgnr = 1;
  718.             int Rigtignr = 0;
  719.  
  720.             do {
  721.  
  722.             Random rnd = new Random();
  723.             int nr1 = rnd.Next(1, 10);
  724.             int nr2 = rnd.Next(1, 10);
  725.  
  726.             Console.WriteLine("Spørgsmål nr {0}, du har {1} rigtige" +
  727.                 "\n" +
  728.                 "Hvad er {2} * {3}?" +
  729.                 "\n" +
  730.                 "Skriv exit for at lukke spillet", Spørgnr, Rigtignr, nr1, nr2);
  731.             input = Console.ReadLine();
  732.  
  733.             if (input == Convert.ToString(nr1 * nr2))
  734.             {
  735.                 Console.WriteLine("Det er nemlig rigtigt!");
  736.                 System.Threading.Thread.Sleep(2000);
  737.                 Console.Clear();
  738.                 Spørgnr++;
  739.                 Rigtignr++;
  740.  
  741.             }
  742.             else if (input == "exit" || input == "Exit")
  743.             {
  744.  
  745.             }
  746.             else
  747.             {
  748.                 Console.WriteLine("Fejl");
  749.                 System.Threading.Thread.Sleep(2000);
  750.                 Console.Clear();
  751.                 Spørgnr++;
  752.                
  753.             }
  754.         } while (dowhile == false);
  755.             dowhile = false;
  756.         }
  757.  
  758.         static void Calculator()
  759.         {
  760.             Console.WriteLine("Enter the first number: ");
  761.             float num1 = Convert.ToInt32(Console.ReadLine());
  762.             Console.WriteLine("Enter the second number: ");
  763.             float num2 = Convert.ToInt32(Console.ReadLine());
  764.             Console.WriteLine("Select the operation you want me to perform: ");
  765.             Console.WriteLine("_________________________________________");
  766.             Console.WriteLine("1: Multiplication");
  767.             Console.WriteLine("2: Addition");
  768.             Console.WriteLine("3: Subtraction");
  769.             Console.WriteLine("4: Division");
  770.             Console.WriteLine("__________________________________________");
  771.  
  772.             Console.WriteLine("Now please enter your choice from: ");
  773.  
  774.             int choice = Convert.ToInt32(Console.ReadLine());
  775.             if (choice == 1)
  776.             {
  777.                 Console.WriteLine("The result is: " + (num1 * num2));
  778.                 Console.Read();
  779.             }
  780.             else if (choice == 2)
  781.             {
  782.                 Console.WriteLine("The result is: " + (num1 + num2));
  783.  
  784.                 Console.Read();
  785.             }
  786.             else if (choice == 3)
  787.             {
  788.                 Console.WriteLine("The result is: " + (num1 - num2));
  789.  
  790.                 Console.Read();
  791.             }
  792.             else if (choice == 4)
  793.             {
  794.                 Console.WriteLine("The result is: " + (num1 / num2));
  795.  
  796.                 Console.Read();
  797.             }
  798.         }
  799.  
  800.     }
  801. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement