Adding to two number without using the third variable - C

//Adding to two number without using the third variable

// C program

  #include <stdio.h>

  int main() {    

    int number1, number2;

    printf("Enter any two numers: ");

    scanf("%d %d", &number1, &number2);

        number1 = number1 + number2;

        printf("The Sum of two number is %d", number1);

    // calculating sum o num1 and num2 , it will be stored in num1

    return 0;

 }


 Output

   Enter any two numers: 1 2

    The Sum of two number is 3




Post a Comment

0 Comments