Skip to content

Commit

Permalink
Merge pull request gouravthakur39#151 from goelhr/patch-2
Browse files Browse the repository at this point in the history
Update BasicArithmatic.c
  • Loading branch information
gouravthakur39 authored Jul 2, 2020
2 parents 1ee7311 + c856d84 commit 06f5ecb
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions BasicArithmatic.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// A simple arithmetic operation on two integers

#include<stdio.h>
int main()
{
int number1,number2,addition,subtraction,multiplication,division,modulo;
printf("Enter two numbers :\n");
scanf("%d%d",&number1,&number2);
addition = number1+number2;
subtraction = number1-number2;
multiplication = number1*number2;
division = number1/number2;
modulo = number1%number2;
printf("Addition of number 1 and number 2 : %d\n",addition);
printf("Subtraction of number 1 and number 2 : %d\n",subtraction);
printf("Multiplication of number 1 and number 2 : %d\n",multiplication);
printf("Division of number 1 and number 2 : %d\n",division);
printf("Modulo of number 1 and number 2 : %d\n",modulo);
return 0;

int main() {
int number1, number2, addition, subtraction, multiplication, division, modulo;
printf("Enter two numbers :\n");
scanf("%d%d", & number1, & number2);
addition = number1 + number2;
subtraction = number1 - number2;
multiplication = number1 * number2;
division = number1 / number2;
modulo = number1 % number2;
printf("Addition of number 1 and number 2 : %d\n", addition);
printf("Subtraction of number 1 and number 2 : %d\n", subtraction);
printf("Multiplication of number 1 and number 2 : %d\n", multiplication);
printf("Division of number 1 and number 2 : %d\n", division);
printf("Modulo of number 1 and number 2 : %d\n", modulo);
return 0;

}

0 comments on commit 06f5ecb

Please sign in to comment.