4. (10 pts) Show what is printed by the following program. Assume that the data values shown are typed in, one at a time, in 4. (10 pts) Show what is printed by the following program. Assume that the data values shown are typed in, one at a time, in response to the prompts: 2 10 6 5 21 problem 4 */ import java.util.Scanner; public class problem4 public static void main(String[] args) int j-0, k-0, x-1, sum-0; Mau peoqkay JouueoS Scanner(System.in); while (x5) { k 0; System.out.print(“type in a number: “); jkeyboard.nextlnt); (6DJ! sum sum +2 j; else k +1; +j+” System.out.println (x + :(uns + “+ ++x śystem.out.printin (x + ” “+j+” “+k keyboard.close); (ums + (



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *