问题描述
大家好。
我有一个令我困惑的问题
它是以下内容:
编写C ++程序在不使用任何算法,循环,递归的情况下找到两个整数的总和。
Hi everybody
I have a problem which is puzzling me
it is the following:
Write a C++ program to find the sum of two integers without using any
arithmetic, loops, recursions nothing.
推荐答案
#include< iostream>
int main(){
std :: cout<< ; 输入两个整数 << std :: flush;
int a,b;
std :: cin> a> b;
std :: cout< ;< 现在输入他们的金额,否则我会告诉妈妈! " << std :: flush;
int sum;
std :: cin> sum;
std :: cout<< 总和 << a<< "和 << b<< "是 <<总和;
std :: cout<< std :: endl;
}
V
-
请删除资金''当用电子邮件回复时,我会回答这个问题吗?我没有回复最热门的回复,请不要问
#include <iostream>
int main() {
std::cout << "Enter two integers " << std::flush;
int a, b;
std::cin >a >b;
std::cout << "Now enter their sum or I''ll tell mom! " << std::flush;
int sum;
std::cin >sum;
std::cout << "The sum of " << a << " and " << b << " is " << sum;
std::cout << std::endl;
}
V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask
今天早些时候,comp.lang.c也让你感到困惑。你在那里得到了
刷新,所以你以为你会在这里试试?
1.选择一种语言。
2.做自己的作业。
Brian
It puzzled you on comp.lang.c as well, earlier today. You got the
brushoff there, so you thought you''d try here?
1. Pick a language.
2. Do your own homework.
Brian
cout<< ; 1 + 1 = 2 \ n;
cout << "1 + 1 = 2\n";
这篇关于两个整数之和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!