final int LIMIT = 15; num sum int num = 1; --- --- int sum = 0; while (num < LIMIT) { num = num + 3; sum = sum + num; } System.out.println ("Last number is " + num + " and sum is " + sum);
String str; int length; System.out.print ("Enter a string of characters: "); str = scan.nextLine(); // Find the length of str ________________________________________________________________; // Write a for loop to print the string backwards
final int MAX_ROWS = 10; for (int row = 1; row <= MAX_ROWS; row++) { for (int star = 1; star <= row; star++) System.out.print ("*"); System.out.println(); }Modify the program to print the "upside down" triangle in part (a) of Programming Project 5.10 on page 280 of the textbook.