Social Icons

Tuesday, 25 March 2014

C Program to Add two numbers without using Add (+) operator

#include<stdio.h>
#include<conio.h>
main()
{
int a, b,c;
clrscr();
printf("\n Enter first number : ");
scanf("%d",&a);
printf("\n Enter first number : ");
scanf("%d",&b);
c = a - ~b - 1;
printf("\n\t The Addition of a and b is : %d ",c);
getch();
}

                                                          OUTPUT

No comments:

Post a Comment