【c 字符串】

#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;
}

猜你喜欢

转载自blog.csdn.net/ummmmm/article/details/80287087