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
Vera_Pavlovna [14]
4 years ago
12

.Write an if-else statement for the following:

Computers and Technology
2 answers:
bija089 [108]4 years ago
8 0

Answer:

Solution part of the question:

if(userTickets>5)  //compare the value of userTickets with 5.

       awardPoints = 10; // assign the 10 value to the award point

       else

       awardPoints=userTickets;// assign the userticket value to the awardpoint.

Output:

For the input 4 the output is 4.

For the input 5 the output is 5.

For the input 6 the output is 10.

For the input 7 the output is 10.

Explanation:

All the other part of the program is given on the question so here only if-else statement is given on the answer part. Which is pasted at the place of "/* Your solution goes here */" and the user can get the right answer.

  • In the "if" statement the value of "userTickets" variable is get compared by 5 and if it is greater than 5 than variable "awardpoint" assigns the '10' value.
  • Otherwise, with the help of "else" statement "userticket" variables value (which is the input value for the program) assign to the "awardpoint" variable.
TiliK225 [7]4 years ago
4 0

Answer:if (userTickets < 7 ) {

        awardPoints = 1;

     }

     else {

        awardPoints = userTickets;

     }

Explanation:

You might be interested in
Meats ages hair and feathers all contain this monomer
OverLord2011 [107]

Answer:Amino Acid

Explanation:

All proteins have amino acids

7 0
3 years ago
When defining an array of class objects, how do you pass arguments to the constructor for each object in the array?
Nuetrik [128]
Basically, the array[ index ] is the name of the object so when you  populate the array you'd have statement[s] like:

array[ index ] = new ClassName( arg0, arg1, arg2 );
8 0
3 years ago
Contemporary pc operating systems and application software use a​ ________, which makes extensive use of​ icons, buttons,​ bars,
V125BC [204]

Contemporary pc operating systems and application software use a​ Graphical User Interface (GUI), which extensively uses​ icons, buttons,​ bars, and boxes to perform tasks.

What is a GUI?

A system of interactive visual components for computer software is known as a GUI (Graphical User Interface).

Compared to MS-DOS and the shell of Unix-like operating systems, a GUI is more user-friendly than a text-based command-line interface.

Objects like icons, cursors and buttons are included in a GUI. Sometimes these elements are enhanced with visual effects like transparency and sounds.

Learn more about Graphical User Interface here: brainly.com/question/14758410

#SPJ4

3 0
2 years ago
This innovator created “honeypots” in which fake accounts are set-up in order to catch cyber criminals.
statuscvo [17]

Answer: A

Explanation:

3 0
4 years ago
Read 2 more answers
Q Basic program write a program in Q Basic to find the cost of 10 pens when the cost of 15 pens is 75 use unitary method to find
Ne4ueva [31]

give the function of cpu

5 0
3 years ago
Other questions:
  • Select the correct answer.
    8·1 answer
  • What is used in computers to communicate with wireless keyboards, mice, and printers?
    8·1 answer
  • You will extend zyLab3, by adding a Player class and extending the PokemonField class. You will be working with three.java files
    13·1 answer
  • Should you configure if you want to limit access to files with certain classifications within a folder to a specific security gr
    13·1 answer
  • Declare a Scanner reference variable fileInput, and assign it a newly created Scanner object that is associated with a file name
    10·1 answer
  • Create a function named CountVowels() that takes one parameter name epsilon
    10·1 answer
  • What are the different Stape of data processing cycle?​
    8·1 answer
  • Trebuie sa scrii niște instrucțiuni în JavaScript care adaugă în DIV lungimea HTML-ului din interiorul tag-ului cu ID​
    14·1 answer
  • A company Digicom Parts manufactures 2 types of unique products for laptop and desktop computers. It manufactures 10 types of la
    15·1 answer
  • (Brainliest!!)<br><br> How do i get rid of a headache?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!