Note: The value of X changes as the body increments.
<喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20140122/2014012209110488.jpg" alt = "\">
Public class ExerciseThree {
Public static void main (String [] args ){
/*
* Follow the steps *
**
***
****
*****
******
*******
External Loop Control
Inner Loop Control Column
External Loop 7 times
Iteration --
Number of columns in an internal loop controlled by an external loop j = I
*/
For (int I = 8; I> 1; I --)
{
For (int j = I; j <9; j ++ ){
System. out. print ("*");
}
System. out. print ("\ n ");
}
For (int I = 0; I <7; I ++)
{
For (int j = 0; j <= I; j ++ ){
System. out. print ("*");
}
System. out. print ("\ n ");
}
/*
* Fight backwards
*/
For (int I = 1; I <7; I ++)
{
For (int j = I; j <7; j ++ ){
System. out. print ("*");
}
System. out. print ("\ n ");
}
For (int I = 1; I <10; I ++)
{
For (int j = I; j <10; j ++ ){
Int a = I * j;
System. out. print (I + "*" + j + "=" + a + "\ t ");
}
System. out. println ();
}
}
}
// String result = "";
//
// For (int I = 0; I <6; I ++ ){
// Int inVal = (int) (Math. random () * 26 + 97 );
// Result = result + (char) inVal;
//}
// System. out. println (result); a random sequence string is generated.