Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need help with number 5 1-Lab5- elational_Operators_AND_Conditional_Statemen u Uveys Pazos Paz yazu 40 USUT 5. Switch/case Problem: You are working for a travelling agency

i need help with number 5 image text in transcribed
1-Lab5- elational_Operators_AND_Conditional_Statemen u Uveys Pazos Paz yazu 40 USUT 5. Switch/case Problem: You are working for a travelling agency that makes arrangements for travelers to three cities: Atlanta, Chicago, and New York. You have been asked to assist with writing a program to seek Tser option for city they like to travel (you can ask user to enter answer in lowercase). Your input should take into account that the user is going to enter a string. If the city is Atlanta, display 'The price is $250': if the city is Chicago, display "The price is $350', if the city is New York, display "The price is $400', for all other cities, display Not on File'. For screenshots of code, show the result of New York and an incorrect input. (You are showing results of two different inputs). 6. PRACTICE PROBLEM ese (Not needed for submission): If you finish Question 5. try re- writing this code using if/else statements instead of switch/case statements. Hint: Use strcmp() function in Lecture 9). Things you should have learned from this lab: 1. How logical and relational operators work. 2. Use of logical functions like: isinf(x), ischar(x), isempty(x), logical(x). 3. Try isnumeric(x) 4. Did you learn the use of xor(a, b)? 5. You should be comfortable with &, &&, L. and all other relational operators 6. Yomshande d bas.mates work daim the noblems.bundfast

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions