1

Java では、次のようなものを作成できます。

 String output = "";

 stop: {
 // count 10 lines

 for ( int row = 1; row <= 10; row++ ){
   // count 5 columns

   for ( int column = 1; column <= 5; column++ {
     if ( row == 5 )
       break stop;
     output += "* ";

     }

     output += "\n";
    }
   output += "\nTerminated Ok.";
  }

The result is a print of 10 lines, but it ends at 5:

 * * * * *
 * * * * *
 * * * * *
 * * * * *
 * * * * *

Is there a Delphi equivalent?

4

1 に答える 1

5
于 2013-06-19T13:20:52.033 に答える