#蓝桥杯练习#输入输出格式练习

[蓝桥杯][算法提高VIP]输入输出格式练习

在这里插入图片描述

#include <bits/stdc++.h>

using namespace std;

int main()
{
    //freopen("in.txt","r",stdin);
	char a,b,c,d,e;
	double n;
	int s;
	scanf("%c%c%c%lf%c%c",&a,&b,&c,&n,&d,&e);
	s = (a - '0') * 100 + (b - '0') * 10 + (c - '0');
	printf("%-8d%c%8.1lf%c%c",s,d,n,d,e);
	return 0;
}

发布了145 篇原创文章 · 获赞 8 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_43476037/article/details/103995771