A+B#include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
a=a+b;
cout<<a<<endl;
system("pause");
return 0;
}
---------------------------------------------
水仙花数#include <iostream>
using namespace std;
int power(int a,int b)
{
int res=1;
while(b>0)
{
res=res*a; --b;
}
return res;
}
int main()
{
for(int num=100;num<1000;++num)
{ if(power(num%10,3)+power(num/10%10,3)+power(num/100,3)==num) cout<<num<<endl;
}
system("pause");
return 0;
}