Using a while loop, and appropriate increment/decrement operators.Write a while loop that prints to console all values of the 9 times table from 108 to 9.
public class Main
{
public static void main(String[] args) {
int n=9;
int i=108;
while(i>=9){
System.out.println(n+" * "+i+" = "+(n*i));
i--;
}
}
}
Comments
Leave a comment