我们可以看到我们只需要输入两个值,然后输出他们的和即可,那么我们可以直接得到C++的代码:
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; cout<<a+b; return 0; }
C语言的代码:
main(){ int a,b; scanf("%d %d",&a,&b); printf("%d\n",a+b); return 0; }
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 追梦算法网 universal account