Pun_Pun_Hello

Act52

Sep 20th, 2021
829
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Rextester.Program.Main is the entry point for your code. Don't change it.
  2. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354)
  3.  
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text.RegularExpressions;
  8.  
  9. namespace Rextester
  10. {
  11.     public class Program
  12.     {
  13.         public static void Main(string[] args)
  14.         {
  15.             //Your code goes here
  16.        
  17.             start:
  18.             Console.Clear();
  19.          
  20.                 char ArithmeticOperatorIdentifier, opt;
  21.             double x, y, sum, difference, product, quotient, Quotient1_Hindi_Ko_Alam_Ano_Ba_Tatawagin_Dito;
  22.            
  23.             Console.WriteLine("[+] - Addition");
  24.             Console.WriteLine("[-]) - Subtraction;");
  25.             Console.WriteLine("[*]) - Multiplication;");
  26.             Console.WriteLine("[/]) - Division;");
  27.             Console.WriteLine("[%]) - Modulo Division;");
  28.                 Console.WriteLine("^^^Choose Symbol Above for Arithmetic Operator^^^");
  29.            
  30.                 Console.Write("\nEnter your First Number: ");
  31.              x = Convert.ToDouble(Console.ReadLine());
  32.                
  33.             Console.Write("Enter your Second Number: ");
  34.              y = Convert.ToDouble(Console.ReadLine());
  35.                
  36.             Console.Write("Enter Arithmetic operator: ");
  37.             ArithmeticOperatorIdentifier = Convert.ToChar(Console.ReadLine());
  38.            
  39.             if (ArithmeticOperatorIdentifier=='+'){
  40.             sum = x+y;
  41.                 Console.WriteLine("The sum of " + x + " and " + y +" is " +sum);
  42.                
  43.             }
  44.             else  if (ArithmeticOperatorIdentifier=='-') {difference = x-y; Console.WriteLine("The difference of " + x + " and " + y +" is " +difference);}
  45.                else  if (ArithmeticOperatorIdentifier=='*') {product = x*y; Console.WriteLine("The product of " + x + " and " + y +" is " +product);}
  46.             else  if (ArithmeticOperatorIdentifier=='/') {quotient = x/y; Console.WriteLine("The quotient of " + x + " and " + y +" is " +quotient);}
  47.             else  if (ArithmeticOperatorIdentifier=='%') {Quotient1_Hindi_Ko_Alam_Ano_Ba_Tatawagin_Dito = x%y; Console.WriteLine("The remainder of " + x + " and " + y +" is " + Quotient1_Hindi_Ko_Alam_Ano_Ba_Tatawagin_Dito);}
  48.                    
  49.            
  50.             //try again code snippet            
  51.                 Console.WriteLine("\nDo you want to Continue? Y/N");
  52.                 opt = Convert.ToChar(Console.ReadLine());
  53.                
  54.             switch (opt){
  55.                    
  56.                 case 'Y':
  57.                 case 'y':
  58.                 goto start;
  59.             }
  60.         }
  61.     }
  62. }
RAW Paste Data