楼主不能只照抄楼上的代码,楼上的只是算法. ^_^
一下的你就可照抄 lol
下次有问题先想想,问问老师/同学...
/*
Name: Nub
Copyright: Mine >:D
Author: Sniper
Date: 08/09/07 22:26
Description: Good Stuff
*/
#include
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>=inputY?inputX-inputY:inputY-inputX) << "\n"; //差
system("pause");
return 0;
}
main()
{int a,b,c,d;
scanf("%d%d",&a,&b);
c=a*b;
d=a-b;
printf("%d,%d\n"c,d);
}