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;
- // calcuator Program in C# (C)2018 Adm1n_0v3rride
- namespace SoloLearn
- {
- class Program
- {
- static void Main(string[] args)
- {
- int choice; // To choose
- int a; // For addition
- int b;
- int answer;
- int c;// For Subtraction
- int d;
- int e;
- int f; // For Multiplication
- int g;
- int h;
- int i; // For Divison
- int j;
- int k;
- Console.WriteLine("Welcome to the calcuator program v1.0\n");
- Console.WriteLine("Please Choose a Option\n");
- Console.WriteLine("1. Addition\n");
- Console.WriteLine("2. Subtraction\n");
- Console.WriteLine("3. Multiplication\n");
- Console.WriteLine("4. Divison\n");
- Console.WriteLine("Please choose: \n");
- choice = Convert.ToInt32(Console.ReadLine());
- if(choice == 1) {
- Console.WriteLine("Please input the First number: \n");
- Firstnumber = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Please input the Secound number: \n");
- Secoundnumber = Convert.ToInt32(Console.ReadLine());
- answer = a + b;
- Console.WriteLine(" The numbers {0} and {1} equal {2} ",a,b,answer);
- Console.ReadLine();
- if(choice == 2) {
- Console.WriteLine("Please input the First number: \n");
- Firstnumber = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Please input the Secound number: \n");
- Secoundnumber = Convert.ToInt32(Console.ReadLine());
- e = c - d;
- Console.WriteLine(" The numbers {0} and {1} equal {2} ",c,d,e);
- Console.ReadLine();
- }
- if(choice == 3) {
- Console.WriteLine("Please input the First number: \n");
- Firstnumber = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Please input the Secound number: \n");
- Secoundnumber = Convert.ToInt32(Console.ReadLine());
- h = f * g;
- Console.WriteLine(" The numbers {0} and {1} equal {2} ",f,g,h);
- Console.ReadLine();
- }
- if(choice == 4) {
- Console.WriteLine("Please input the First number: \n");
- Firstnumber = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Please input the Secound number: \n");
- Secoundnumber = Convert.ToInt32(Console.ReadLine());
- h = f / g;
- Console.WriteLine(" The numbers {0} and {1} equal {2} ",f,g,h);
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement