Adding Negative numbers without using plus operator

int main() {
int x = -1, y = -4;
while(y!=0)
{
    x--;
    y++;
   
}
    printf("%d",x);
 
  return 0;
}

output: -5

Comments

Popular posts from this blog

Finding the second largest in an array