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
Whatis the restriction placed on the push operation for an array-based implementation of a stack?
tatuchka [14]

Answer:

if the number of elements in the array are equal to the size of the array then return -1.

Explanation:

We are implementing stack using array.Stack is a LIFO(Last In First Out) type data structure.Insertion and deletion is from one end only.

So while push operation or inserting elements in the stack using array we have to check that the capacity of array is not reached.If reached then no element can be inserted in the stack.If not then we can insert element in the stack.

8 0
3 years ago
Use a while loop to repeatedly take input from the user and calculate a sum. The user will only be allowed to type in numbers, b
aev [14]

Answer and Explanation:

#take input from user

n = int(input("Enter any number: "))

#sum variable to store sum

sum=0

#condition to exit from loop

while n!=-999:

   #adding entered number in sum variable

  sum=sum+n

  #take input from user

  n = int(input("Enter any number : "))

#print the sum  

print("sum =",sum)

output:

Enter any number: 10

Enter any number : 100

Enter any number : -999

sum = 110

3 0
3 years ago
What is the function of a computer screen?
Leni [432]

Hi!

A computer screen is what you are staring at right now!

It displays the output. Behind it are wires and cords.



~CoCo

7 0
4 years ago
A device receives a data link frame with data and processes and removes the Ethernet information. What information would be the
il63 [147K]

The information that would be the next to be processed by the receiving device is: IP at the internet layer.

<h3>Internet protocol (IP)</h3>

Internet protocol is a network protocol that help to transmit data to user device across the internet or network which inturn make it possible for user device to connect and communicate over the network.

Internet protocol at the internet layer is a TCP/IP software protocol which sole purpose is to transfer data packets across the internet after receiving and processing the data.

Inconclusion the information that would be the next to be processed by the receiving device is: IP at the internet layer.

Learn more about internet protocol here:brainly.com/question/17820678

7 0
2 years ago
Select the correct answer.
jenyasd209 [6]
I think it is D
Hope my answer help you?
5 0
3 years ago
Other questions:
  • Which design approach help build sites that optimize varied screen sizes
    5·1 answer
  • Make a program that prints each line of its input that mentions fred. (It shouldn’t do anything for other lines of input.) Does
    10·1 answer
  • The first thing you must consider in any type of communication is ______.
    9·2 answers
  • Which concept often comes in conflict with privacy rights?
    14·1 answer
  • Which practice is the safest way to sit at a desk while typing on the computer?
    12·1 answer
  • Which of the following allows the transmission of voice and often video communication over the internet?
    12·1 answer
  • Once you have a listing of every unique combination of salesperson, product and location, what Excel function would you use to c
    14·1 answer
  • Create another method: getFactorial(int num) that calculates a Product of same numbers, that Sum does for summing them up. (1,2,
    7·1 answer
  • If you have 128 oranges all the same size, color, and weight except one orange is heavier than the rest. Write down a C++ Code/A
    7·1 answer
  • Places where computer are used​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!