#include <bits/stdc++.h>
//freopen("D:\\test.in", "r", stdin);
//freopen("D:\\test.out", "w", stdout);
using namespace std;
const int maxn = 1e5 + 5;
char s[maxn];
char t[maxn];
int main() {
scanf("%s", s + 1);
printf("%s", s);
int len = strlen(s + 1);
for(int i = 1; i <= len; i ++) {
}
printf("%s", s + 1);
int a;
scanf("%d", &a);
printf("%5d\n", a);
printf("%05d\n", a);
long long b;
scanf("%lld", &b);
printf("%lld\n", b);
double c;
scanf("%lf", &c);
printf("%.10f\n", c);
char s[50];
scanf("%s", s);
int len = strlen(s);
for(int i = len - 1; i >= 0; i --) {
s[i + 1] = s[i];
}
s[0] = 'a';
for(int i = 0; i < len + 1; i ++) {
printf("%c", s[i]);
}
return 0;
}
【c 字符串】
最新推荐文章于 2022-04-17 16:51:33 发布
本文通过一个简单的C++程序介绍了如何进行基本的字符串处理和标准输入输出操作,包括字符串读取、打印以及整数和浮点数的格式化输出。
1万+

被折叠的 条评论
为什么被折叠?



