爆0求救大佬

P1957 口算练习题

@[Mer_](/space/show?uid=184549) ~~gets是一定不能用的~~
by Kubic @ 2019-04-29 20:16:18


qwq 那怎么改啊,我一个初学者只会gets()
by RedreamMer @ 2019-04-29 20:17:54


@[Mer_](/space/show?uid=184549) 用 ```cpp scanf("%s", x); ```
by Strong_Jelly @ 2019-04-29 20:26:30


@[神兵qqq1112](/space/show?uid=143681) 可是这样就不能读入一行了,
by RedreamMer @ 2019-04-29 20:43:27


@[Mer_](/space/show?uid=184549) 可以啊
by Strong_Jelly @ 2019-04-29 20:44:54


只不过不能读空格了
by Strong_Jelly @ 2019-04-29 20:46:07


@[神兵qqq1112](/space/show?uid=143681) 这样不行的吧,我记得,好像只能读空格前的部分
by RedreamMer @ 2019-04-29 20:47:13


@[神兵qqq1112](/space/show?uid=143681) 好吧,谢谢,我再改改qwq
by RedreamMer @ 2019-04-29 20:48:05


@[Mer_](/space/show?uid=184549) 实在不行用string ```cpp #include <string>//头文件 #include <bits/stdc++.h> using namespace std; string s;//定义 int main() { getline(cin, s);//读入一行 return 0; } ``` 有需要的函数问我就行
by Strong_Jelly @ 2019-04-29 20:50:28


@[神兵qqq1112](/space/show?uid=143681) 好的,谢谢,我再做做吧
by RedreamMer @ 2019-04-29 20:52:09


| 下一页