Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console.WriteLine ("Welcome to the Calculator project!");
- Console.WriteLine ("\nPress any key to continue");
- Console.ReadKey ();
- string FirstName;
- string LastName;
- Console.Write ("\nFirst Name : ");
- FirstName = Convert.ToString (Console.ReadLine ());
- Console.Write ("Last Name : ");
- LastName = Convert.ToString (Console.ReadLine ());
- Console.WriteLine (" Hello " + FirstName + " " + LastName + " ,And welcome to the Calculator project ");
- Console.ReadKey ();
- Console.Write ("Please State Your Age : ");
- int age = Convert.ToInt32 (Console.ReadLine ());
- if (age < 18) {
- Console.WriteLine ("That's too bad, You will have to wait a couple of years");
- } else if (age == 18) {
- Console.WriteLine ("You barely missed it!");
- } else if (age > 18){
- Console.WriteLine ("You are allowed to enter");
- }
- Console.ReadKey ();
- Console.Write ("Choose a method of calculating");
- Console.Write ("\n1 = *");
- Console.Write ("\n2 = /");
- Console.Write ("\n3 = +");
- Console.Write ("\n4 = -");
- Console.WriteLine ("Method : ");
- int dupelicate = Convert.ToInt32 (Console.ReadLine ());
- int addup = Convert.ToInt32 (Console.ReadLine ());
- int remove51 = Convert.ToInt32 (Console.ReadLine ());
- int devide = Convert.ToInt32 (Console.ReadLine ());
- if (dupelicate == 1) {
- decimal num01;
- decimal num02;
- Console.Write ("Type a number to be multiplied");
- num01 = Convert.ToInt32 (Console.ReadLine ());
- Console.Write ("Type another number");
- num02 = Convert.ToInt32 (Console.ReadLine ());
- Console.Write (num01 + "*" + num02 + "=" + num01 * num02);
- }
Add Comment
Please, Sign In to add comment