Untitled
unknown
plain_text
3 years ago
360 B
5
Indexable
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b;
c = float(b) / float(a) * 100;
if (c == 0) cout << 0;
else if (c >= 1 && c <= 10) cout << 1;
else if (c >= 11 && c <= 50) cout << 2;
else if (c >= 51 && c <= 70) cout << 3;
else if (c >= 71 && c <= 84) cout << 4;
else if (c >= 85 && c <= 100) cout << 5;
}Editor is loading...