import java.util.Scanner; public class Task5{ public static void main(String args[]){ Scanner input = new Scanner(System.in); System.out.println("Enter table #: "); int tableNo = input.nextInt(); System.out.println("Enter start #: "); int startNo = input.nextInt(); System.out.println("Enter end #: "); int endNo = input.nextInt(); int i; for(i = startNo; i <= endNo; i++){ System.out.printf("%d x %d = %d\n",i,tableNo,tableNo*i); } } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter