fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int numInput, input;
  6. if (cin >> numInput && numInput > 0) {
  7. if (cin >> input) {
  8. cout << input;
  9. while (--numInput > 0 && cin >> input) {
  10. cout << ": " << input;
  11. }
  12. cout << endl;
  13. }
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5404KB
stdin
5 10 -15 -95 -25 25
stdout
10: -15: -95: -25: 25