fork(1) download
  1. #include <iostream>
  2. #include<vector>
  3. #include<algorithm>
  4. #include<iterator>
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9.  
  10. std::vector<std::string> vec;
  11. std::copy(std::istream_iterator<std::string>(std::cin),
  12. std::istream_iterator<std::string>(),
  13. std::back_inserter(vec));
  14.  
  15. for(auto v:vec)
  16. std::cout<<"-"<<v<<std::endl;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3480KB
stdin
          VAR 0       
START:    LDN NUM01   
          SUB NUM02   
          STO MYSUM   
          LDN MYSUM   
          STO MYSUM   
END:      STP         
NUM01:    VAR 1025    
NUM02:    VAR 621     
MYSUM:    VAR 0 
stdout
-VAR
-0
-START:
-LDN
-NUM01
-SUB
-NUM02
-STO
-MYSUM
-LDN
-MYSUM
-STO
-MYSUM
-END:
-STP
-NUM01:
-VAR
-1025
-NUM02:
-VAR
-621
-MYSUM:
-VAR
-0