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