首页 > 复制输出
头像 Ayx03
发表于 2022-03-19 17:31:25
字符串长度并未给出,因此不考虑使用 char 数组和 gets(),更何况后者在 C++11 中已经被移除。 #include<bits/stdc++.h> using namespace std; int main(){ char s=getchar(); while( 展开全文
头像 霸气灬钦哥
发表于 2020-07-25 10:10:09
#include<iostream> #include<cstring> using namespace std; int main() { string s; getline(cin,s); cout<<s<<endl; }分 展开全文
头像 吴桐宇
发表于 2023-01-31 13:32:00
今天我们来挑战python一行题解!!!! print(input()) 撒花~结束 是不是很简单!!
头像 潍坊鲨鱼公园儿童大学
发表于 2021-01-26 16:38:48
#include <iostream> #include <string> using namespace std; int main() { string str; getline(cin, str); cout << str; 展开全文
头像 我儿雷俊有大帝之资
发表于 2024-11-10 15:02:16
#include <stdio.h> int main(){     char c;     while((c=getchar())!='\n'){     printf ("%c",c);}     ret 展开全文
头像 牛客517072235号
发表于 2021-08-01 19:24:54
#include<iostream> #include<string> using namespace std; int main() { string a; getline(cin,a); cout<<a; return 0; } 展开全文
头像 阿八阿八
发表于 2022-02-27 15:20:50
#include<stdio.h> #include<string.h> int main() {     int i,j;     char str[1000];   &nb 展开全文
头像 Tender^
发表于 2021-10-02 23:58:13
#include<bits/stdc++.h> using namespace std; int main(){ char a; a=getchar(); while(a!='\n'){ cout<<a; a=getch 展开全文
头像 23数二杨帆
发表于 2023-11-02 11:15:39
#include <bits/stdc++.h> using namespace std; int main() { string str; getline(cin , str); cout << str; return 0; }
头像 祁皓轩
发表于 2022-01-15 21:52:40
这题只需使用getline函数和cout语句以及对字符串的定义即可AC #include<bits/stdc++.h> using namespace std; int main() {     string  展开全文

等你来战

查看全部