You are on page 1of 1

------------------------------------------------------------------------------ 7. Write a Program to find the factor of 1400.

Your program should accept an


***** Lab Challenges #2 [ Identifiers, variables and Data Types ] ***** integer number and tell the user whether the number is factor of 1400 or not.
------------------------------------------------------------------------------
8. Write a Program to calculate the area of a rectangle.
1. What would be the correct variable declaration using the the correct identifier
rule: 9. Write a Program that display divisor, factor, quotient & remainder,
• Age of a person. Input should be accepted from the user.
• Income of an employee.
• Number of words in a dictionary.
• A letter of the alphabet.
• A greeting message.
• Gravity

2. Given a = 5 , b = 1 , z = 10 , k = 4, j = 8, and y = 5 , create a program that


outputs the result of the formula

(a – b) x (z – y)
(k2 – 2j)

3. Create a program that uses the same formula above to output the result; this
time, however, prompt the user for the values a , b , x , k , j , and y . Use
appropriate variable names and naming conventions.

4. Create a program that prompts a user for his/her name. Store the user’s name
using the std::cin function and return a greeting back to the user using his/her
name.

5. Create a new program that prompts a user for numbers and determines total
revenue using the following formula:
Total Revenue = Price * Quantity

6. Build a new program that prompts a user for data and determines a commission
using the following formula:
Commission = Rate * (Sales Price – Cost)

You might also like