Respuesta :

Answer:

if(userTickets< 6)

awardPoints = 1;

else

awardPoints = userTickets;

Explanation:

  • The above code is in C language, In which the first statement is used to compare the userTickets value by 6 that userTickets value is less than 6 or not.
  • If the user tickets value is less than 6 then the statement of 'if' condition will be executed which assign the 1 value to the awardPoints.
  • If the user tickets value is not less than 6 then the statement of else will be executed which assign userTickets value to the awardPoint

The  if-else statement for the following code is :

x = 6

userTickets = 3

if x < 6:

  awardPoints = 1

  print(awardPoints)

else:

  awardPoints = userTickets

  print(awardPoints)

The code is written in python.

Code explanation:

  • The variable x is initialise to 6
  • The variable userTickets is also initialise to 3.
  • Using the if statement, we check if x is less than 6.
  • If it is less than 6, awardPoints is equals to 1 and it is printed out.
  • Else awardPoints is equals to the userTickets and then it is outputted using the print statement.  

learn more on if-else statement here: https://brainly.com/question/25302477?referrer=searchResults

Ver imagen vintechnology