Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1: Write a C++ program to take input for month and day of the month. Your program should declare variables to store the value of

Q1: Write a C++ program to take input for month and day of the month. Your program should declare variables to store the value of month and day of month in two variables. If the month entered is not between 1 and 12, display a message telling the user that an invalid month is entered. If the day of the month entered is not between 1 and 31, inform user that an invalid day has been entered. Make sure that your program makes sure that integer is entered for both the input.

Q2: Write a C++ program to calculate a person's weekly salary according to following conditions. If hours worked are less than or equal to 20, person receives 10.00 $ per hour. Otherwise person receives 120.00 plus $12 for each hour worked over 20 hours. The program should take hours worked as input and display the salary as output.

Q3: Write a C++ program to determine whether an entered character is lower case or upper case. If letter is lower case, determine and print its position in the alphabet. For example if letter 'c' is entered, your program should print 3. Similarly if the entered letter is upper case letter, determine and print its position in the alphabet. For example, if 'H' is entered, your program should print 7. (Hint: If entered character is lowercase, its position can be determined by subtracting 'a' from the letter and adding 1. Similarly if entered character is upper case, its position can be determined by subtracting 'A' from the letter and adding 1.

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

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

What is a database schema? What information does it contain?

Answered: 1 week ago