class ForTest
{
public static void main(String[] args)
{
int a;
int b;
System.out.println("------1번--------");
for(a = 0; a<2; a=a+1)
{
for(b=0; b<3; b=b+1)
{
System.out.print(a);
}
}
System.out.println("------2번--------");
for(a = 0; a<2; a=a+1)
{
System.out.println(a);
for(b=0; b<3; b=b+1)
{
System.out.print(b);
}
System.out.print(b);
}
System.out.println("------3번--------");
int count = 0;
for(a = 0; a<2; a=a+1)
{
for(b=0; b<3; b=b+1)
{
System.out.print(count);
}
System.out.println();
}
System.out.println("------4번--------");
count = 0;
for(a = 0; a<2; a=a+1)
{
for(b=0; b<3; b=b+1)
{
count = count+1;
System.out.print(count);
}
System.out.println();
}
System.out.println("------5번--------");
count = 0;
for(a = 0; a<2; a=a+1)
{
count = count + 1;
for(b=0; b<3; b=b+1)
{
System.out.print(count);
}
System.out.println();
}
System.out.println("------6번--------");
count = 0;
for(a = 0; a<100; a=a+1)
{
count = count + 1;
System.out.print(count);
if( count%5==0 ) // 5의 배수이면
{
System.out.println();
}
}
System.out.println("------7번--------");
for(a = 1; a<=100; a=a+1)
{
System.out.print(a+1);
if( a%5==0 ) // 5의 배수이면
{
System.out.println();
}
}
System.out.println("------8번--------");
count = 0;
for(a = 1; a<=20; a=a+1)
{
for(b = 1; b<=5; b=b+1)
{
System.out.print(count);
}
System.out.println();
}
System.out.println("------9번--------");
int start = 1;
int end = 30;
for( a = 0; a< 10 ; a=a+1)
{
System.out.println("★");
}
System.out.println("------10번--------");
int k = 10;
for( a = 0; a< 5 ; a=a+1)
{
for( b=0; b< a; b=b+1)
{
System.out.println("★");
}
}
System.out.println("------11번--------");
k = 10;
for( a = 0; a< 5 ; a=a+1)
{
for( b=0; b< a+1; b=b+1)
{
System.out.print("*");
}
System.out.println();
}
}
}
/*
C:\javaExam\03_로직연습_중첩문>java ForTest
------1번--------
000111
------2번--------
0
01231
0123------3번--------
000
000
------4번--------
123
456
------5번--------
111
222