Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 4: DECISION MAKING Write C++ programs to do the following: [1-4 mandatory] 1. To check whether the given number is odd or even using

image text in transcribed
Lab 4: DECISION MAKING Write C++ programs to do the following: [1-4 mandatory] 1. To check whether the given number is odd or even using if- else statement. 2. To find the largest among given 3 numbers using if statement 3. To compute all the roots of a quadratic equation using switch statement. [Hint : x = (-b +/- sqrt(b2-4ac))/2a] 4. To check whether the given number is zero, positive or negative using else-if ladder. 5. To find the smallest among three numbers using conditional operator. 6. To accept the number of days a member is late to return the book and calculate and display the fine with the appropriate message using if-else ladder. The fine is charged as per the table below Late period Fine 5 days - 50 paise 6-10 days - 1 rupee Above 10 days - 5 rupees After 30 days - 10 rupees

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

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

What is a make or buy analysis?

Answered: 1 week ago

Question

Are aspects of the architecture reusable?

Answered: 1 week ago

Question

Describe the types of power that effective leaders employ

Answered: 1 week ago

Question

Describe how leadership styles should be adapted to the situation

Answered: 1 week ago