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 2 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 main(String[] args){
Scanner scnr = new Scanner(
System.in);
int pairsOfBoots;
int pairsofSandals;
int totalpairs;
pairsOfBoots = scnr. nextInt ();
1
System.out.println(pairsOfBoots +" pairs of boots");
System.out.println(pairsOfSandals +" pairs of sandals");
System.out.println(totalPairs +" total");
}
}
 A shoe store has pairsOfBoots read from input representing the number

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!