Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Divider
  8. {
  9. class Program
  10. {
  11.  
  12. static void Main(string[] args)
  13. {
  14. Console.Title = "OfficialMango's Divider© ";
  15. Console.Beep(750,120);
  16. Task.Delay(2000);
  17. Console.Beep(500,240);
  18. Task.Delay(2000);
  19. Console.Beep(250,480);
  20. Task.Delay(2000);
  21. Console.Beep(125, 800);
  22.  
  23. while (true)
  24. {
  25. Console.Title = "OfficialMango's Divider© ";
  26. Console.WriteLine("Welcome to OfficialMango's Divider!");
  27. Console.WriteLine("");
  28. Console.WriteLine("!!!Do not type any Letters otherwise it will crash!");
  29. Console.WriteLine("");
  30.  
  31.  
  32.  
  33. float num01 = 0;
  34. float num02 = 0;
  35.  
  36. Console.WriteLine("");
  37. Console.Write("Type a Number:");
  38. bool Set1 = false;
  39. while (Set1 == false)
  40. {
  41. (Set1 == false);
  42.  
  43. Console.WriteLine("Invalid");
  44. }
  45.  
  46.  
  47. {
  48.  
  49. string input = Console.ReadLine();
  50. if (Single.TryParse(input, out num01)) // 'out num01' says 'store the result in num01'
  51. {
  52. Set1 = true;
  53. }
  54. }
  55. Console.WriteLine("");
  56. Console.Write("Type a second Number:");
  57.  
  58. bool Set2 = false;
  59. while (Set2 == false)
  60. {
  61. string input = Console.ReadLine();
  62. if (Single.TryParse(input, out num01)) // 'out num01' says 'store the result in num01'
  63. {
  64. Set2 = true;
  65.  
  66. }
  67. }
  68.  
  69.  
  70.  
  71.  
  72.  
  73. num02 = Convert.ToSingle(Console.ReadLine());
  74. Console.WriteLine(num01 + " divided by " + num02 + " is equal to: " + (num01 / num02));
  75.  
  76. Console.Beep(750, 50);
  77. Console.ReadKey();
  78. Console.Clear();
  79. }
  80.  
  81. }
  82.  
  83.  
  84. }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement