Last active
December 7, 2015 13:48
-
-
Save msuryaprakash/ffea022bea6bbf464d77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
main() | |
{ | |
int first, second, add, sub, mul; | |
float divi; | |
printf("Enter two integers\n"); | |
scanf("%d %d", &first, &second); | |
add = first + second; | |
sub = first - second; | |
mul = first * second; | |
div = first / (float)second; //Typecasting | |
printf("Sum = %d\n",add);//Addition | |
printf("Subtraction = %d\n",sub);//Subtraction | |
printf("Multiplication = %d\n",mul);//Multiplication | |
printf("Division = %.2f\n",divi);//Division | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment