언어/Java
구구단 짜기
power-girl0-0
2020. 3. 31. 21:05
728x90
이중 for문을 활용하여 구구단 짜기 입니다.
소스↓
public class gugudan {
public static void main(String[] args) {
for(int i=1; i<=9; i++)
{
for(int j=2; j<=9; j++)
{
System.out.print(j+"*"+i+"="+i*j+"\t");
}
System.out.println();
}
}
}
결과값 ↓
728x90