首页 > 其他 > 详细

蓝桥杯训练 字符串的输入输出处理 格式可能有点坑

时间:2019-03-08 22:43:24      阅读:233      评论:0      收藏:0      [点我收藏+]

题目链接http://www.dotcpp.com/oj/problem1094.html

 

AC代码:

技术分享图片
#include<iostream>
#include<cstring>
using namespace std;
const int maxn = 1e6+10;
//===================
int n;
char c[1000 + 10];
int main(){

    cin >> n;
    getchar();
    for (int i = 0; i < n; i++){
        gets(c);
        puts(c);
        if (i!=n-1)
        cout << endl;
    }
    cout << endl;
    while (cin>>c){
        cout <<endl<< c ;
    }
    return 0;
}
View Code

 

蓝桥杯训练 字符串的输入输出处理 格式可能有点坑

原文:https://www.cnblogs.com/looeyWei/p/10498517.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!