First Commit
This commit is contained in:
16
ShortHandArithmeticOperations.c
Normal file
16
ShortHandArithmeticOperations.c
Normal file
@@ -0,0 +1,16 @@
|
||||
// WAP to perform arithmetic operations (addition, subtraction, multiplication, division) by using shorthand operators.
|
||||
|
||||
void main() {
|
||||
int a,b;
|
||||
a=5;
|
||||
b=5;
|
||||
printf("The value of a=%d \nThe value of b=%d\n",a,b);
|
||||
a+=b;
|
||||
printf("The sum of a & b = %d\n",a);
|
||||
a-=b;
|
||||
printf("The difference of a & b = %d\n",a);
|
||||
a*=b;
|
||||
printf("The product of a & b = %d\n",a);
|
||||
a/=b;
|
||||
printf("The quotient of a & b = %d\n",a);
|
||||
}
|
||||
Reference in New Issue
Block a user