/* Write a C program to add two numbers without using any operators */
#include<stdio.h>
int add(int x, int y)
{
return printf("%*c%*c", x, '\r', y, '\r');
}
int main()
{
printf("Sum = %d", add(3, 4));
return 0;
getch();
}
Output
---------
Sum = 7
#include<stdio.h>
int add(int x, int y)
{
return printf("%*c%*c", x, '\r', y, '\r');
}
int main()
{
printf("Sum = %d", add(3, 4));
return 0;
getch();
}
Output
---------
Sum = 7
No comments:
Post a Comment