import javax.swing.*;
class ThreeKindsOfLoops
{
public static void main(String[] args)
{
int x = Integer.parseInt(JOptionPane.showInputDialog("Enter number:"));
System.out.print('\f');
int c = 0;
boolean forever = true;
System.out.println("While Loop");
while (forever)
{
c = c + 1;
System.out.println(c*x);
if (c == 5)
{
break;
}
}
c = 0;
System.out.println("Do-While Loop");
do
{
c = c + 1;
System.out.println(c*x);
}
while (c < 5);
System.out.println("For Loop");
for (c = 1; c<=5; c++)
{
System.out.println(c*x);
}
}
}