P1000 超级玛丽游戏
简单来说,就是打印!
cout<<R"()"; 我的devc++竟然不能用(我太菜了,不会调试)
cout<< 走天下!
P1001 A+B Problem(经典)
#include <iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
cout<<a+b;
return 0;
}
要是他是一个加法计算机怎么办,我们不能执行一次计算机就奔溃了吧!
多组输入
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int a,b;
while(scanf("%d%d",&a,&b) != EOF)
{
cout<<a+b;
}
return 0;
}
P1035 [NOIP2002 普及组] 级数求和
枚举?
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int k;
cin>>k;
int i;
for(double Sn=0;Sn<=k;++i,Sn+=1.0/i);//枚举??
cout<<i;
return 0;
}
至此(水完毕)