Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Divider
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Title = "OfficialMango's Divider© ";
- Console.Beep(750,120);
- Task.Delay(2000);
- Console.Beep(500,240);
- Task.Delay(2000);
- Console.Beep(250,480);
- Task.Delay(2000);
- Console.Beep(125, 800);
- while (true)
- {
- Console.Title = "OfficialMango's Divider© ";
- Console.WriteLine("Welcome to OfficialMango's Divider!");
- Console.WriteLine("");
- Console.WriteLine("!!!Do not type any Letters otherwise it will crash!");
- Console.WriteLine("");
- float num01 = 0;
- float num02 = 0;
- Console.WriteLine("");
- Console.Write("Type a Number:");
- bool Set1 = false;
- while (Set1 == false)
- {
- (Set1 == false);
- Console.WriteLine("Invalid");
- }
- {
- string input = Console.ReadLine();
- if (Single.TryParse(input, out num01)) // 'out num01' says 'store the result in num01'
- {
- Set1 = true;
- }
- }
- Console.WriteLine("");
- Console.Write("Type a second Number:");
- bool Set2 = false;
- while (Set2 == false)
- {
- string input = Console.ReadLine();
- if (Single.TryParse(input, out num01)) // 'out num01' says 'store the result in num01'
- {
- Set2 = true;
- }
- }
- num02 = Convert.ToSingle(Console.ReadLine());
- Console.WriteLine(num01 + " divided by " + num02 + " is equal to: " + (num01 / num02));
- Console.Beep(750, 50);
- Console.ReadKey();
- Console.Clear();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement