answer.
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
rosijanka [135]
1 year ago
12

Write a statement that uses a conditional expression that determines if the credits variable is less than 0. If the condition is

true, assign the value 0 to the credits variable, otherwise the value of the credits variable should remain unchanged.
Computers and Technology
1 answer:
gtnhenbr [62]1 year ago
8 0

Answer:

The statement and the expression is "credits = credits<0?0 : credits;" for the above question.

Explanation:

  • The conditional expression is an expression that is used to determine the true and the false case. It works like the if and the else statement.
  • It has three parts which are shown above, in which the first part is to check the condition, the second part is excuted if the condition is true and the third part is executed if the condition is false. The variable is used to assign the value.
  • If any user provides the credit value and writes the above statement then the credit variable holds 0 for negative value and it holds the original value for any positive or zero value.
You might be interested in
c++ You are given an array A representing heights of students. All the students are asked to stand in rows. The students arrive
Lilit [14]

The below code will help you to solve the given problem and you can execute and cross verify with sample input and output.

#include<stdio.h>

#include<string.h>

 int* uniqueValue(int input1,int input2[])

 {

   int left, current;

   static int arr[4] = {0};

   int i      = 0;

     for(i=0;i<input1;i++)

      {

         current = input2[i];

         left    = 0;

         if(current > 0)

         left    = arr[(current-1)];

      if(left == 0 && arr[current] == 0)

       {

       arr[current] = input1-current;

       }

       else

   {

       for(int j=(i+1);j<input1;j++)

       {

           if(arr[j] == 0)

           {

               left = arr[(j-1)];

               arr[j] = left - 1;

           }

       }

   }

}

return arr;

}

4 0
2 years ago
An expression containing the operator &amp;&amp; is true either or both of its operands are true. True/False
Luba_88 [7]

Answer:

True.

Explanation:

An expression containing the && and  operator is only true if both of the operands present in the expression are true otherwise it will give the result as false if either one of them is false or both of them are false.In the question it states that the expression in true either or both of it's operand are true.

Hence the answer is true.

4 0
1 year ago
In this image, which feature did we most likely use to quickly change the background, fonts, and layout?
MAVERICK [17]

Answer: themes

Explanation:

Took the test

3 0
1 year ago
Megan has written the following rough draft for her assignment. Choose the correct way to complete each sentence. Sarah is creat
atroni [7]

Answer:

I. hatching

II. filter

Explanation:

Sarah is creating an image. She wants to achieve tonal effects with parallel lines by varying their densities and distribution patterns. She will use <u>hatching</u> to do this. She also wants to add special effects on the image. Therefore, she will use <u>filters</u>.

Hatching refers to an art technique in which parallel lines are used to shade by drawing them closely together.

Stippling is an art technique used in the making of patterns by using small dots.

Filters is a technique of changing image characteristics. It is used to change the picture characteristics & to add special effects to an image such as the shade, contrast, tone, brightness etc.

We therefore see that, <u>hatching</u> and <u>filter</u> are the correct answers respectively

3 0
2 years ago
Menus are attached to windows by calling the _____ method.
Kruka [31]

Answer: setJMenubar

Explanation:Menus that are component of the Menu bar that display the options and tools for any function that can be performed in the system have the connection with the window in the field of java through the command of the setJMenubar. It is the command which is given to execute to bring the menu to the particular frame and get it attached according to the JFrame. Therefore, the correct option is setJMenubar.

6 0
2 years ago
Other questions:
  • When preparing a spreadsheet that contains population data for different nations, what is the best way to provide a visual compa
    12·2 answers
  • A good website design combines which of the following elements? (select all that apply) powerful web server hardware components
    9·2 answers
  • vertical exchanges are typically used only to buy and sell materials required for an organization's support activities ( True or
    14·2 answers
  • Select the correct answer. Rachel needs to make a presentation on ethics and etiquettes in college. She has about 30 minutes to
    13·1 answer
  • #A year is considered a leap year if it abides by the #following rules: # # - Every 4th year IS a leap year, EXCEPT... # - Every
    5·1 answer
  • Which advertising medium has the widest reach on a global front?
    12·1 answer
  • The computer component that makes sure that instructions are decoded and executed properly is the ___________.
    11·2 answers
  • Mile markers appear as _____ green signs.
    6·2 answers
  • Five friends plan to try a startup. However, they have a limited budget and limited computer infrastructure. How can they avail
    11·1 answer
  • If a class has member variables that are pointers, you must ensure that you implement ____.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!