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
AleksAgata [21]
3 years ago
6

Write an if-else statement for the following: If user_tickets is less than 5, assign 1 to num_tickets. Else, assign user_tickets

to num_tickets
Computers and Technology
1 answer:
Genrish500 [490]3 years ago
7 0

Solution :

function tickets(user_tickets){

var num_tickets;

if (user_tickets < 5) {

num_tickets = 1;

return ('num_tickets: '+ num_tickets);

}

else {

num_tickets = user_tickets;

 return('num_tickets: '+ num_tickets);

}

}

// Testing the tickets function

// With user_tickets = 3, 5, 8, and 1

console.log(tickets(3));

console.log(tickets(5));

console.log(tickets(8));

console.log(tickets(1));

You might be interested in
Declare a typedef struct named jumper_t that will have four parts: character array name that is 16 in length, double array of tr
Maurinko [17]

Answer:

The typedef struct is as follows:

typedef struct jumper_t {

  char name[16];

  double tries[N_TRIES];

  double best_jump;

  double deviation;

} jumper_t;

The declaration of jlist is:

jumper_t jlist[10];

Explanation:

This defines  the typedef structure

typedef struct jumper_t {

The following declares the variables as stated in the question

<em>   char name[16]; </em>

<em>   double tries[N_TRIES]; </em>

<em>   double best_jump; </em>

<em>   double deviation; </em>

}

This ends the typedef definition

jumper_t;

(b) The declaration of array jlist is:

jumper_t jlist[10];

6 0
3 years ago
What does the label display when the user clicks the button? void btnSubmit_Click(object sender, EventArgs e) { int num1 = 3; in
erma4kov [3.2K]

Answer:

10

Explanation:

num1=3 and num2=2

num3=myproc(num1)+myproc(num2)

myproc(num1) results 6

myproc(num2) results 4

when we add both e get 10

6 0
3 years ago
¿Toda sustancia de aspecto homogéneo es siempre una sustancia pura?
Gwar [14]

Answer:

No, las sustancias homogéneas pueden ser mezclas.

8 0
2 years ago
Explain how can we determine that where is the strength of magnetic force maximum in a
snow_lady [41]

Answer:

by making a experiment

Explanation:

8 0
3 years ago
PLEASE HELP!
ss7ja [257]

Explanation:

Case-sensitivity is inherently faster to parse (albeit only slightly) since it can compare character sequences directly without having to figure out which characters are equivalent to each other. It allows the implementer of a class/library to control how casing is used in the code.

3 0
2 years ago
Other questions:
  • Write a C++ program that searches for anagrams in a dictionary. An anagram is a word obtained by scrambling the letters of some
    5·1 answer
  • Which network could NOT carry commercial traffic?
    5·1 answer
  • You are troubleshooting an interface issue on your cisco ios isr. the output of "show ip interface brief" indicates that etherne
    11·1 answer
  • When I comes to saving money, what is good rule of thumb
    5·1 answer
  • Which port-authentication network access control standard forces devices to go through a full authentication, authorization, and
    13·1 answer
  • PLEASE HELP, True or False: The term whitespace speaks to the design of a website
    8·2 answers
  • Write a paragraph on the following topic.
    14·1 answer
  • For questions 3-6, consider the following two-dimensional array:
    11·2 answers
  • 6. kinukuha nito ang kabuuang bilang ng mga numerical na datos sa mga piniling cells
    12·1 answer
  • 1. The letters that appear after the dot after a file name are called the:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!