Write a program to find the sum of positive integers without using any operator.
C program:
#include<stdio.h>
int add(int x, int y)
{
return printf("%*c%*c", x, ' ', y, ' ');
}
int main()
{
printf("Sum = %d", add(3, 4));
return 0;
}
Output:
Sum = 7
0 comments:
Post a Comment