fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int MAX_SIZE = 100;
  5.  
  6. int main() {
  7. int num, registers[MAX_SIZE], i = 0;
  8. char skip;
  9. while (cin >> num) {
  10. registers[i] = num;
  11. cin >> skip;
  12. ++i;
  13. }
  14. for (int j = i - 1; j >= 0; --j) {
  15. cout << registers[j] * 2;
  16. if (j) {
  17. cout << ',';
  18. }
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Standard output is empty