# How To Create Calculator In C#

Welcome To MasterPrograming.com

Aaj C# Language me Calculator banana sikhte hai or Ham C# Language Me Kuch Option Ka Use Karte Hai Jisse Hamari C# Language Skills Imporve Hogi or Har Topic Ko ham Details Read Karte Hai Aapne Bahut Website Dekho Hogi Lekin Wo Aapko Details Me Nhi Batate Jisse Aapka Time Waste Hota Or Kuch Sikhne Ko Nhi Milta Hai.

How To Create Calculator In C#

Ham Calculator Ko Bahut Alag Alag Function Se Bana Sakte Hai Leking Ham Aaj Kuch New Design Me Banate Hai Or Kuch Alag Karte Hai .

Calculator In C# Language
``````// Follow This Code

#include <stdio.h>    // Use Input output Dene Ke liye
#include <conio.h>    // Use Clear Screen Or Getch
#include <math.h>   //  Use Math Calculation

int main()
{

int input,a,b,result;
char option;
clrscr();
do{

printf("Calculator:\n");

printf("\n Enter 1 for addition:\n ");
printf("Enter 2 for subtraction:\n ");
printf("Enter 3 for division:\n ");
printf("Enter 4 for multiplication:\n ");
printf("Enter The Choice No.\n");
scanf("%d",&input);
printf("Enter First number:\n");
scanf("%d",&a);
printf("Enter second number:\n");
scanf("%d",&b);

switch(input){
case 1 : result=a+b;
break;
case 2 : result=a-b;
printf("The Substraction is : %d\n",result);
break;
case 3 : result=a/b;
printf("The Multiplication is : %d\n",result);
break;
case 4 : result=a*b;
printf("The division is : %d\n",result);
break;

default: printf("wrong input\n");

}
printf("Do you want to continue ? (y/n)\n");
option=getche();

}while(option=='y');

gatch();
}``````

Output

Aap Dekh Sakte Hai Ye output hai Lekin Aapko Pahle Program ko Read Karna Hoga Jisse Aap Or Accha Program Bana Sakte Hai Me Aapko Isme Kuch Topic Samjha Ta Hu

Switch Statement

Switch Statement Bahut Important Hai Isme Aap Or Method Se Bhi Program Bana Sakte Hai Lekin Switch Statement Ka Use Karke Chota Program Kar Sakte Hai Or Easy Bhi

Switch Statement Me Ek Jyada Condition Ka Use Kar Sakte Hai Jese Ki Agar Aap Division Karna Chahte Ho To Keval Switch Statement Me Condition Lga Do Or Fir Switch Statement Khud Karke Results De De Ga Jese Ki Aap Program Dekh Rhe Hai Ussi Tarah OR bhi Condition Lga Sakte Hai .

Agar Aapko Program Se Related Kuch Problem Hoto Aap Hamare Se Question Kar Sakte Hai .