Pages

Friday, 18 September 2015

Addition without using any operator

Addition of two positive values without using any operator

Coding:

#include<stdio.h>
int add(int x, int y)
{
 return printf("%*c%*c",x,' ',y,' ');
}

int main()
{
 printf("Sum = %d",add(8,9));
 return 0;
}
Output:
Sum = 17