Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Coding a simple decision scenario in C. ( Not C++) 1) Need at least three variables 2) Need at least two ANDs and one OR,

Coding a simple decision scenario in C. ( Not C++)

1) Need at least three variables

2) Need at least two ANDs and one OR, or two ORs and one AND.

3) In your code, you must use:

at least two integral types (int, long, etc.)

at least one real number (double or float)

at least one character array (char and char*)

Prompt the user for each variable, read the variable from the console, and print the resulting decision.

Make sure your program compiles, runs and gets the right answer, at least using your interpretation of the scenario.

Scenario: If someone goes to a local coffee shop to order their favorite coffee and their order is wrong and they have driven half way home they can go back and get a new coffee or get a refund or they can call and get a refund back on their card.

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions