1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
GrogVix [38]
3 years ago
12

"Using the printf method, print the values of the integer variables bottles and cans so that the output looks like this: Bottles

: 8 Cans: 24 The numbers to the right should line up. (You may assume that the numbers have at most 8 digits.)"
Computers and Technology
1 answer:
Anika [276]3 years ago
6 0

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       

       System.out.println("Enter the number of bottles and cans:");

       int numberOfbottles = in.nextInt();

       int numberOfcans = in.nextInt();

       System.out.printf("Bottles: %8d\n", numberOfbottles);

       System.out.printf("Cans:    %8d\n", numberOfcans);

}

}

Explanation:

Ask user to input the number of bottles and cans using Scanner class

Print the results so that the numbers to the right line up (Since we know that the numbers have at most 8 digits, we can use %8d in printf. Also, be aware that how printf statements are written so that the numbers line up)

You might be interested in
Flexibility and cost reduction are advantages generally associated with ? networks.
ahrayia [7]

Answer:

Wireless networks

Explanation:

Wireless networks provide more configuration flexibility and are less expensive. Companies that add employees will greatly benefit from the flexibility of wireless connections. Workstations can be moved with ease without the effort and cost required to run wires and cables. It is the best for network expansion since companies can add users quickly and grow their networks cost-effectively.

7 0
4 years ago
Which one of the following is true about employer responsibility in providing fall protection to workers? not selected A. Employ
Luda [366]

Option B is the correct answer, Employers have flexibility in choosing a fall protection system they believe will work best in a situation selected. It is the primary duty of employer to provide safety to its workers. Employers must setup a suitable protection system at workplace from falling off from overhead platforms and from elevated workstations during construction for safety of its employees.  

Further Explanation:

⦁ Employer must ensure compliance to OSHA-Fall protection in construction.

⦁ Generally, fall protection must be ensured by deploying guardrail systems at the edge of construction sites, safety systems built by nets or personal fall arrest.

⦁ OSHA requires to built fall protection system irrespective of fall distance to make sure safety conditions for workers/ employees.

Answer details:

Grade: High School

Subject: Computer Science and Technology.

Learn More:

Fall protection and compliance to OSHA rules and regulations

brainly.com/question/8910167

Employer responsibility in providing fall protection

brainly.com/question/5872956

Key Words: Fall protection, OSHA, workplace safety, guardrail systems etc.

Image of guardrail as an example is attached.

5 0
4 years ago
Read 2 more answers
Which technology is used to uniquely identify a wlan network?
expeople1 [14]
The answer is SSID

SSID which in full stands for Service Set Identifier is used to identify a network. It ensures that clients are able to locate a WLAN in which they are attached to. In Layman’s terms, it’s the username or the primary name in a WiFi setup in which a user joins and is connected to.






8 0
3 years ago
tomaso is explaining to a colleague the different types dns attacks. which dns attack would only impact a single user?
SIZIF [17.4K]

A DNS attack which would only impact a single user is: DNS poisoning attack.

DNS is an acronym for domain name system and it can be defined as a naming database in which internet domain names (website URLs) are stored and translated into their respective internet protocol (IP) address.

This ultimately implies that, a Domain Name System (DNS) is used to connect a uniform resource locator (URL) or a web address with their internet protocol (IP) address.

In Cybersecurity, there are different types of DNS attacks and these include:

  • ‎DNS flood attack.
  • DNS tunneling.
  • DNS poisoning attack.

DNS poisoning attack is a special type of Domain Name System (DNS) attack that is designed to only impact or affect a single user.

Read more: brainly.com/question/17273205

7 0
3 years ago
cell d1 contains the value 7.877 you want cell d1 to display this value as 7.9 how can you accomplish
Georgia [21]

Answer:

You round?

Explanation:

6 0
4 years ago
Other questions:
  • Pages with obvious problem with functionality or errors in displaying content
    11·1 answer
  • Which Windows feature captures and stores copies of folders and files at specific points in time, allowing users or administrato
    10·1 answer
  • Give a big-O estimate the number of operations, where an operation is a comparison or a multiplication, used in this segment of
    10·1 answer
  • Given an array a, write an expression that refers to the first element of the array .
    5·1 answer
  • someone please tell me if you watch drag race (rupauls drag race) I need someone to talk to about it ​
    12·1 answer
  • U $ er Ideas for R 0 B 1 0 X?
    12·2 answers
  • Can we update App Store in any apple device. (because my device is kinda old and if want to download the recent apps it aint sho
    10·1 answer
  • Do OBS mic filters apply everywhere? Such as discord and other apps similar. Or is it just on streaming?
    15·1 answer
  • Additional rows and columns are inserted into a table using the
    6·1 answer
  • Javier downloads an illustration from an online Image library and modifies it for his purposes. The illustration he downloads is
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!