public class dowhile_looping
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int b=1;
do
{
System.out.print("Perulangan menuju angka : ");
int n = in.nextInt();
System.out.print("=> ");
b++;
for(int a=1;a<=n;a++)
{
System.out.print(a);
System.out.print(" ");
}
System.out.println(" ");
System.out.println(" ");
}while(b<=5);
}
}
Tidak ada komentar:
Posting Komentar