Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an if-else statement for the following If userTickets is greater than 5, execute awardPoints 10. Else, execute awardPoints user Tickets. Ex: If userTickets is

image text in transcribed
Write an if-else statement for the following If userTickets is greater than 5, execute awardPoints 10. Else, execute awardPoints user Tickets. Ex: If userTickets is 14, then awardPoints 10 1 sinclude 3 int main(void) ( 4 int awardPoints; 5 int userTickets; scanf("kd., susertickets); 7, Program will be tested with values: 4, s, 6, . 10 : f(userTickets:5)( ,,If-Else 11 awardPoints 10 12 elset Block 14 1 15 printf"dn".ardPoints)* Your solution goes here 16 17 printf("kdin", awardPoints) 18 return e 19 20 Check Try again It user Tickets is greater than 5, the expression evaluates to true and awardi orts s assgred with 10 Else i evaluates to false and awardPoints is assigned with user Tickets Testing with input-4 Output differs. See highlights below Special character legend Your 4 output Expected4 output

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

Define and explain drug tolerance and dependence.

Answered: 1 week ago

Question

How were the HR functions affected by Hurricane Rita?

Answered: 1 week ago