17 lines
447 B
C
17 lines
447 B
C
// 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);
|
|
}
|