rileysuxatmath7771 rileysuxatmath7771
  • 11-07-2019
  • Computers and Technology
contestada

Write a conditional expression that assign the value 0 to a credits variable if it is less than 0; otherwise the value of the credits variable remains unchanged.

Respuesta :

tonb
tonb tonb
  • 11-07-2019

Answer:

credits = (credits < 0) ? 0 : credits;

Explanation:

This is the ternary conditional operator.

Answer Link
joaobezerra joaobezerra
  • 17-01-2020

Answer:

void updateCredit(float credit){

if credit < 0.0

credit = 0.0;

}

Explanation:

I am going to write a C function for this.

The input is your credit value, and it has just a conditional to verify if it is not negative.

void updateCredit(float credit){

if credit < 0.0

credit = 0.0;

}

Answer Link

Otras preguntas

the founding fathers established a federal system for all of the following reasons except- to divide the power given to government to establish a system of che
(Science) Match each word with its example Words Examples (Also examples) -Speed -Speed+Direction
The denver public library wants to estimate the percent
The distance from the earth to Mercury is approximately 57,000,000 miles. Express this distance in scientific notation.
Which best explains what a credit score represents?
CORRECT answer will be marked as THE BRAINLIEST ANSWER. Thank you =) How can a personal spelling list help you learn correct spellings of words? You can create
What is the answer to 17
What was the norths main goal in fighting the civil war?
What is the answer to 17
how did the oppsing sides of the revolutionary war compare with each other