Question: Integers numberOfItems, allowedGroups, and rejectedGroups are read from input. If numberOfltems is 2 2 or more, then subtract 5 from allowedGroups. Otherwise, add 3 to
Integers numberOfItems, allowedGroups, and rejectedGroups are read from input. If numberOfltems is or more, then subtract
from allowedGroups. Otherwise, add to rejectedGroups.
Click here for examples
import java.util.Scanner;
public class GroupResearch
public static void mainString args
Scanner scnr new Scanner
System.in;
int numberofitems;
int allowedGroups;
int rejectedGroups;
numberofitems scnrnextInt ;
allowedGroups scnrnextInt ;
rejectedGroups scnrnextInt ;
Your code goes here
System.out.printlnallowedGroups;
System.out.printlnrejectedGroups;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
