Home  • Programming • C

Subtract two integer numbers without using subtraction operator using C language

#include<stdio.h>
#include<conio.h>

void main(){
   int a,b,d;
   scanf("%d%d",&a,&b);
   d=a+~b+1;
   printf("%d",d);
  getch();
}

Comments 0


Share

Copyright © 2024. Powered by Intellect Software Ltd