fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. printf( "problem : " );
  6. {
  7. int counts = 3;
  8. for ( int i = 0; i < counts; i++ )
  9. {
  10. int counts = 5;
  11. printf( "%d ", i );
  12. }
  13. }
  14.  
  15. printf( "\nsolution : " );
  16. {
  17. int counts = 3;
  18. for ( int i = 0; i < counts; i++ )
  19. {
  20. counts = 5;
  21. printf( "%d ", i );
  22. }
  23. }
  24.  
  25. return 0;
  26. }
Success #stdin #stdout 0s 5540KB
stdin
Standard input is empty
stdout
problem : 0 1 2 
solution : 0 1 2 3 4