Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASSIGNMENT No: 2 Q1. What are different datatypes of datasets in C++. List the main types and mention the all categories with min and max

image text in transcribed
image text in transcribed
image text in transcribed
ASSIGNMENT No: 2 Q1. What are different datatypes of datasets in C++. List the main types and mention the all categories with min and max numbers that can be represented by these data types. Q2. What are the four types condition statements in C++. Briefly explain about each with one example for each. Q3. Write a C++ program that display multiples of 10 between 100 and 500. Q4. Write a C++ program that calculate and display Electricity bill based on the following rules: Units of Electricity consumption = Watts of the Electrical equipment * Time of use per day in hours + 30 days* Unit charge 71000. Unit charge for local customers @ 20 Fils per unit and it is expatriates @40 Fils per unit. Additional charges: 5% VAT on the total bill User inputs are as shown in the figure Please enter Watts of an electrical Equipment: XXXXXXX.XOKX Please enter duration of daily usage in hours: XXXXXXXXXXXX Customer Type (1 for Local and 2 for Expatriate): Electricity Charge per Month: XXXXXXX.XXX Q5. Write a C++ program to implement a two input EXOR gate operation using C++ program. Y = (NOT(A) AND B) OR (A NOT(B)) Q6. Implement a calculator using C++ to do the following operations: Addition, Subtraction, Multiplication, Division, Power, Square root, Log and Exponentiation. User must enter the select the mode first: 'N' for Normal and 'S' for scientific. Normal allows four operations +, -* / and Scientific mode allows P(power), S(sq. root), L (Log), E (exponentiation). Welcome to Calculator Program This program is Prepared by your name and ID ************SEBERRETERESHERS Ressu Please enter the mode of operation Normal - N' or 'Scientific .S Please enter the operation (power), s(sq. root), 1 (Log), e (exponentiation). P Please enter a number and the power 2 ie 2 * 10 - 1024 Do you want to continue.. Y to continue or any other key to quit Please follow additional instructions provided in the lecture. Q7. Write a C++ that accepts the weight and height and calculate BMI using the formula. BMI = Weight (kg) Heights (metery - Program should display the class as per the limits given in the table below. BMI Class Under Weight 35 Please follow the instructions to assure full marks: This is an individual work, and copying by any means will be considered an act of cheating. Images, screenshots, etc., of your work, should be clear and readable. Please respect the deadlines and do not procrastinate. Following output screens may be useful to slove the above problem. First Screen: Welcome to calculator Program This program is Prepared by your name and ID Please enter the mode of operation Normal - N' or 'scientific - S If your choice is N, then the following screen would appear. Welcome to calculator Program This program is prepared by your name and ID Please enter the mode of operation Normal - N' or 'Scientific - S Please enter the first number Please enter the operator +,-,,/ Please enter the second number N 56 4 87 56 +87 - 143 Do you want to continue.. Y to continue or any other key to quit If your choice is S, then Welcome to calculator Program This program is prepared by your name and ID Etteeseetetve Please enter the mode of operation Normal N' or 'scientific Please enter the operation (power), 5(sq. root), 1 (log), e (exponentiation). S If the selected operation is power then you would see the following screen

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

Pro Oracle Fusion Applications Installation And Administration

Authors: Tushar Thakker

1st Edition

1484209834, 9781484209837

More Books

Students also viewed these Databases questions

Question

5-8. How does careful revision reflect the you attitude? [LO-1]

Answered: 1 week ago