C++编程设计一个程序,输入两个整数,计算并输出两个整数的乘积和之差。

C++编程设计一个程序,输入两个整数,计算并输出两个整数的乘积和之差。,第1张

楼主不能只照抄楼上的代码,楼上的只是算法 ^_^
一下的你就可照抄 lol
下次有问题先想想,问问老师/同学
/
Name: Nub
Copyright: Mine >:D
Author: Sniper
Date: 08/09/07 22:26
Description: Good Stuff
/
#include <iostream>
using namespace std;
int difference(int X,int Y);
int main()
{
int inputX,inputY,Ans;
cout << "Please input the first number:"; //X输入
cin >> inputX;
cout << "Please input the second number:"; //Y输入
cin >> inputY;
cout << "\nThe product of these two numbers is:" << (inputX inputY) << "\n"; //积
cout << "The difference of these two numbers is:" << (inputX>=inputYinputX-inputY:inputY-inputX) << "\n"; //差
system("pause");
return 0;
}

以上就是关于C++编程设计一个程序,输入两个整数,计算并输出两个整数的乘积和之差。全部的内容,包括:C++编程设计一个程序,输入两个整数,计算并输出两个整数的乘积和之差。、、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/zz/9489154.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-28
下一篇 2023-04-28

发表评论

登录后才能评论

评论列表(0条)

保存