How to make a simple Calculator With Programming Code


Hello Everyone,Here I show you the Simple Code of making  a simple Calclator with c programming .This article will help you to make that such a calculator. A Simple Code is
Given Below :

#include<stdio.h>
#include<conio.h>
int main()
{
int n,num1,num2,result;
printf("\nwhat operation do you want to do?\n");
printf("press 1 for addition\n");
printf("press 2 for subtraction\n");
printf("press 3 for multiplication\n");
printf("press 4 for division\n");
scanf("%d",&n);
printf("please enter first number\n");
scanf("%d",&num1);
printf("please enter a second number\n");
scanf("%d",&num2);
switch(n)
{
     case 1:result=num1+num2;
               printf("addition of two numbers is %d",result);
               break;
     case 2:result=num1-num2;
             printf("subtraction of two numbers is %d",result);
              break;
     case 3:result=num1*num2;
            printf("multiplication of two numbers is %d",result);
            break;
     case 4:result=num1/num2;
            printf("division of two numbers is %d",result);
             break;
default:printf("worng input");
}
getch();
return 0;
}

In The End Of This article I request to all of my visitors to visit my youtube channel.Click here to Visit 

                                                        Our IT Course

1)Professional Video Editing Course:
2)Photoshop Basic for Beginner Course:
3)Professional Videography & Editing Course:
4)After Effects Full Course:
5)Graphic Design Full Course A-Z:
6)Digital Marketing Course:
7)Amazon Affiliate Marketing Course:
8)Facebook Marketing Course:
9)Complete CPA Marketing Course:
10)Complete Affiliate Marketing Course:

                                        Click here to Lear about our Free IT Course

No comments

Thanks For Commenting .
we'll approve your comment soon.
Thank you

Powered by Blogger.