⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 2181.cpp

📁 这是哈尔滨工业大学acmOJ的源代码
💻 CPP
字号:
/*  This Code is Submitted by wywcgs for Problem 2181 on 2006-03-27 at 11:13:37 */ 
#include <cstdio>
#include <cstring>

const int L = 64;
const int NON = 128;

int main()
{
	char unit[L], name[L], lack[NON][L];
	int i, n = 0;
	double a, r;
	
	while(scanf("%lf %s %lf%*c", &a, unit, &r) != EOF && a >= 0) {
		gets(name);
		if(a*100 < r) strcpy(lack[n++], name);
		else printf("%s %.1lf %s %.0lf%%\n", name, a, unit, 100*a/r);
	}
	printf("Provides no significant amount of:\n");
	for(i = 0; i < n; i++) printf("%s\n", lack[i]);
	
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -