Question: 5 2 8 0 4 0 . 3 4 8 9 5 2 8 . qx 3 zqy ? Jump to level 1 Integers numberOfThings,

528040.3489528. qx3zqy?
Jump to level 1
Integers numberOfThings, acceptedGroups, and remainingGroups are read from input. If numberOfThings is 24 or less, then add 4 to acceptedGroups. Otherwise, add 2 to remainingGroups.
Ex: If the input is 2311,5, then the output is:
15
5
import java.util.Scanner;
public class GroupData {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
int numberOfThings;
int acceptedGroups;
int remainingGroups;
numberofThings = scnr. nextInt ();
acceptedGroups = scnr. nextInt ();
remainingGroups = scnr. nextInt () ;
I* your code goes here *I
System.out.println(acceptedGroups);
System.out.println(remainingGroups);
1
2
3
4
 528040.3489528. qx3zqy? Jump to level 1 Integers numberOfThings, acceptedGroups, and remainingGroups

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!