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
alexdok [17]
4 years ago
8

Given the following code fragment and the input value of 4.0, what output is generated?

Computers and Technology
1 answer:
kicyunya [14]4 years ago
4 0

Answer:

c) 4.4

Explanation:

You can evaluate step by step the code. You know tha your input is 4.0

Step 1 Variables definitions:

double tax;

double total;

Step 2 Ask the user for the input:

System.out.print("Enter the cost of the item");

Step 3 read de input:

total = scan.nextDouble();

Step 4 evaluate the condition (  is the input greater or equal  than 3.0 ? [True])

if ( total >= 3.0)

Step 5 get done the operations inside the condition and print it:

tax = 0.10;

System.out.println(total + (total * tax));

You might be interested in
Why we need each section of prologprogram?
evablogger [386]

Answer:

Prolog program are used in the artificial intelligence and the web development in a systematic manner process. As, it is also sometimes known as declarative language which basically consist of some facts and list. Prolog program are divided into the sections that are:

  • Domain sections
  • Clauses sections
  • Predicates sections
  • Goal sections

We need each section of the prolog program because all the sections introduced the systematic program and performed there particular functions so by using all these processing steps an efficient function are formed.

6 0
3 years ago
Which of the following items is not found on a web page?
navik [9.2K]
The answer is B. book mark definitely
7 0
3 years ago
A(n) ________ button is one that when you click one time it turns the feature on and when you click again, it turns off.
cupoosta [38]
It's a toggle button
5 0
3 years ago
Which of the following is an input device on a toaster?
iragen [17]
The electrical outlet
3 0
3 years ago
Read 2 more answers
This elementary problem begins to explore propagation delay and transmission delay, two central concepts in data networking. Con
puteri [66]

Answer:

Explanation:

Solution

a)

The "bit" is just leaving "Host A"

b)

The 1st bit is in the link and has not reached "Host B"

c)

The 1st bit has reached "Host B"

6 0
4 years ago
Other questions:
  • Why would you use a database system instead of traditional file system
    6·1 answer
  • The temperature of a plastic cube is monitored while the cube is pushed 8.7 m across a floor at constant speed by a horizontal f
    8·1 answer
  • Mrs. Jackson wrote a newsletter to the customers of her housecleaning business that included some organizational tips they could
    8·2 answers
  • Which software is used for cover letters and resumes
    9·2 answers
  • Write a program that takes paragraph from the user and prints all unique words in that paragraph using strings in c++
    5·1 answer
  • The picture above is a description of the C code below. Please modify the C below so that it uses FILE HANDLING (fopen, fputs, f
    5·1 answer
  • State three reasons why users attach speakers to their computer​
    8·1 answer
  • Need the answer ASAP!!! I’ll mark brainliest if correct
    5·1 answer
  • What is wrong with line 3 ?
    11·1 answer
  • Problem Statement − Suppose the problem statement at hand is to contain the attrition that happens in companies worldwide. High
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!