fork download
  1. #include <iostream>
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. int x[6]={369,396,639,693,936,963};
  8. for(int i=1;i<100;i++){
  9. string k=to_string(i);
  10. string s="";
  11. s+=k;
  12. for (int j=0;j<6;j++){
  13. int p=x[j];
  14. string r=to_string (p);
  15. s+=r;
  16. int z=stoi(s);
  17. cout<<z<<"\n";
  18. //cout<<stoi(z)<<"\n";
  19. }}
  20. return 0;
  21. }
Runtime error #stdin #stdout #stderr 0s 5556KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'std::out_of_range'
  what():  stoi