*C program* to perform basic arithmetic operation *subtraction* of *two numbers*. *Numbers* are assumed to be integers and will be entered by a user.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*Program to subtract two numbers without using subtraction operator*/ #include<stdio.h> int main(){ int a,b,sum; printf("Enter any two integers: "); scanf("%d%d",&a,&b); sum = a + ~b + 1; printf("Difference of two integers: %d",sum); return 0; } Output: Enter any two integers: 10 4 Difference of two integers: 6 |

(Visited 26 times, 1 visits today)