Ticker

6/recent/ticker-posts

C Program To Subtract Two Numbers without using Minus Operator



 #include <stdio.h>

int main()

{

 int a,b,s=0,i;

 printf("enter the a and b values\n");

 scanf("%d %d",&a,&b);


s=a+~b+1;

printf("%d\n",s);


}


output:-

enter the a and b values

10 2

8

కామెంట్‌ను పోస్ట్ చేయండి

0 కామెంట్‌లు