problemscpp
A collection of my answers to algorithm problems in c++.
静态 Public 成员函数 | 所有成员列表
acwing::acwing659类 参考

AcWing 659. 区间 更多...

#include <acwing.h>

静态 Public 成员函数

static int main (istream &, ostream &)
 

详细描述

AcWing 659. 区间

在文件 acwing.h391 行定义.

成员函数说明

◆ main()

int acwing::acwing659::main ( istream &  cin,
ostream &  cout 
)
static

在文件 acwing.cpp1005 行定义.

1005 {
1006 double x;
1007 const string output[] = {"[0,25]", "(25,50]", "(50,75]", "(75,100]"};
1008 cin >> x;
1009 if(x < 0.0 || x > 100.0) {
1010 cout << "Fora de intervalo";
1011 } else if(x > 75.0) {
1012 cout << "Intervalo " << output[3];
1013 } else if(x > 50.0) {
1014 cout << "Intervalo " << output[2];
1015 } else if(x > 25.0) {
1016 cout << "Intervalo " << output[1];
1017 } else {
1018 cout << "Intervalo " << output[0];
1019 }
1020 return 0;
1021 }

被这些函数引用 acwing::TEST().


该类的文档由以下文件生成: