[Solved] SOLVED: A basic calculator

30 $

File Name: SOLVED:_A_basic_calculator.zip
File Size: 244.92 KB

SKU: [Solved] SOLVED: A basic calculator Category: Tag:

Or Upload Your Assignment Here:


In this assignment, you will create a basic calculator with a minor twist to keep things interesting. The calculator should be capable of the following operations: • add two numbers • subtract two numbers • multiply two numbers • divide two numbers • generate a random number within a given range. Be careful to ensure that the user does not try to divide by zero. Here are some example runs of the program: Menu 1. Add 2. Subtract 3. Multiply 4. Divide 5. Generate Random Number What would you like to do? 8 I’m sorry, 8 wasn’t one of the options Menu 1. Add 2. Subtract 3. Multiply 4. Divide 5. Generate Random Number What would you like to do? 4 What is the first number? 3 What is the second number? 8 Answer: 0.375 Menu 1. Add 2. Subtract 3. Multiply 4. Divide 5. Generate Random Number What would you like to do? 4 What is the first number? 6 What is the second number? 0 I’m sorry, you can’t divide by zero. Menu 1. Add 2. Subtract 3. Multiply 4. Divide 5. Generate Random Number What would you like to do? 5 What is the lower limit? 10 What is the upper limit? 20 Answer: 15.325396639642719

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED: A basic calculator
30 $