使用算术运算符编写无添加程序 [英] Writing addition program w/o using arithmetic operators
本文介绍了使用算术运算符编写无添加程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能编写一个简单的C / C ++程序,它打印两个整数的总和而不使用算术运算符,即a + b。
How can i write a simple C/C++ Program that prints the sum of two integers without using arithmetic Operator i.e. a+b.
推荐答案
这看起来像是作业。
提示考虑使用按位运算符。
This looks like homework.
Hint is think about using bitwise operators.
这篇关于使用算术运算符编写无添加程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文