Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <sstream>
- #include <map>
- using namespace std;
- int main() {
- string line;
- getline(cin, line);
- map<double, int> numbers;
- istringstream ss(line);
- double number;
- while (ss >> number) {
- numbers[number]++;
- }
- for(auto& n : numbers) {
- cout << n.first << " -> " << n.second << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement