|
|
вернуться в форумwhere is wrong? #include <iostream> #include <map> using namespace std; int main () { int n, m, value; int id, i; float result; map <int, int> counters; cin >> n >> m; for (i = 1; i <= m; i ++) { cin >> value; ++ counters[value]; } for (map <int , int>::const_iterator it = counters.begin(); it != counters.end(); ++ it) { result = it -> second; printf ("%.2f%\n", 100 * result / m); } return 0; } |
|
|