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]
3 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]3 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
What does ‘‘negotiation’’ mean when discussing network protocols? give an example?
rewona [7]
Some protocols have multiple algorithms to choose from for e.g., cryptographic purposes. During connection set up, client and server negotiate which one they'll use.

One example is the set up of a TLS connection. During the handshake, the client shares a list of its supported ciphers (the 'ciphersuites'). The server responds by indicating the best one that both sides support.

4 0
2 years ago
How is abstraction used in a GPS system
ipn [44]
The designs on the map of the GPS system Im would think but can you be more specific?
8 0
3 years ago
Read 2 more answers
Which are characteristics of interpreters? Select
SVEN [57.7K]

Answer:

translation is used for interpretation

8 0
2 years ago
Read 2 more answers
After you have been working out for a month, should your Resting Heart Rate increase or decrease?
Ipatiy [6.2K]

Answer:

Your resting heart rate will decrease as your heart becomes stronger through

Explanation:

8 0
3 years ago
Write a small program basic c++, that defines a negative integer (between ‐1 and ‐255), converts it to a positive value and then
ANEK [815]

Answer:

#include <iostream>

using namespace std;

int main() {

int a=-156;//negative integer between -1 and -255.

a*=-1;//multiplying a to -1 so that it can become positive.

cout<<a;//printing a.

return 0;

}

Explanation:

The above written program is in C++ and in the program an integer a is defined with a negative value in the program it is -156.Then to convert it to positive integer we have to multiply a to -1 after that printing the value of a on the screen.

4 0
2 years ago
Other questions:
  • Given 3 floating-point numbers. Use a string formatting expression with conversion specifiers to output their average and their
    14·1 answer
  • Which of the following is a characteristic of the internet today? distributed network central hub lack of protocols absence of c
    5·1 answer
  • What must you be careful of when retrieving messages/data from mobile devices in public?
    13·1 answer
  • Which is the primary use of a word processor? create, edit, format, and print text-based documents maintain a database of record
    5·1 answer
  • Businesses use spreadsheets to keep track of financial________.
    14·1 answer
  • What is one method that can be used to open the Microsoft Word application?
    8·1 answer
  • A) Write 600 as the product of prime factors.<br> Give your answer in index form.
    7·2 answers
  • Which describes the hypothesis of an experiment? the variable changed by the experimenter/ the quantity that must remain constan
    9·1 answer
  • Reading (BCK FORM 2C IT 2020-2021)
    12·2 answers
  • Profitability, consumer relations, and competition are involved in what kinds of concerns in the design process?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!