Question: A shoe store has pairsOfBoots read from input representing the number of pairs of boots. The shoe store then receives 2 additional pairs of boots.
A shoe store has pairsOfBoots read from input representing the number of pairs of boots. The shoe store then receives additional pairs of boots. The next day, the shoe store receives enough pairs of sandals such that they have the same number of pairs of boots and pairs of sandals.
First, write statements to update pairsOfBoots and pairsOfSandals.
Then, assign the variable totalPairs with the total number of pairs of boots and pairs of sandals.
Click here for example
import java.util.Scanner;
public class ShoesData
public static void mainString args
Scanner scnr new Scanner
System.in;
int pairsOfBoots;
int pairsofSandals;
int totalpairs;
pairsOfBoots scnr nextInt ;
System.out.printlnpairsOfBoots pairs of boots";
System.out.printlnpairsOfSandals pairs of sandals";
System.out.printlntotalPairs total";
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
