参考1:https://blog.csdn.net/BBHHTT/article/details/75671653 ;
参考2:https://blog.csdn.net/c_base_jin/article/details/24120251
scanf()详细简介参考:https://blog.csdn.net/p312011150/article/details/78866884
三者都是从标准输入流stdio (标准输入设备,一般指向键盘)中读取内容。
1.scanf输入字符串的时候不会接收Space空格,回车Enter,Tab键,则认为输入结束。
2.gets能接收空格键,回车键,Tab键,回车则认为输入结束,并用“\0”替代写入数组。此时需要注意数组的空间大小。
3.getchar只能接受一个字符,遇到回车结束输入,可接受回车键。常用来吸收回车符。
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <map>
#include <set>
#include <bitset>
#include <ctime>
#include <cstring>
#