SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
c program to add two numbers without using addition operator (using subtraction operator)
c program to add two numbers without using addition operator (using subtraction operator)
Output:
Enter two numbers to get its sum:
5 6
Sum=11
Implementation:
#include
int main(void) { int a,b; printf("Enter the first number:\n"); scanf("%d",&a); printf("Enter the second number:\n"); scanf("%d",&b); printf("The sum of %d & %d is %d",a,b,(a-(-b))); return 0; }
PREVIOUS
NEXT
HOME