Q # 02: Input three different numbers from the user and calculate its sum, difference, remainder, product and division. Q # 03



Download 8.79 Kb.
Date26.04.2018
Size8.79 Kb.
#46884
Assignment # 01:
Q # 01:Implement the following table using cout
No Square cube

0 0 0


1 1 1

2 4 8


3 9 27

. . .


10 100 1000
Q # 02: Input three different numbers from the user and calculate its sum, difference, remainder, product and division.
Q # 03: Implement y=ax3 +7Z2.


Assignment # 02:
Q # 01: Find factorials of numbers from 1 to 100 and display the result in tabular form.

Assignment # 03:
Q # 01: Implement division of a long double variable and show on output the maximum value of the number that your system can display.


Assignment # 04:
Q # 01: solve 5*15+4==13&&12<19||!0==5<24.
Q # 02: write a program to make a basic calculator that will be able to implement basic operations of addition, subtraction, multiplication, division , sin , cosine, and tangent.


Assignment # 05:

Q # 01: A phone number such as (212) 767-8900, can be thought of as having three parts: the area code(212) , the exchange(7670 and the number 8900. write a program that uses a structure to store these three parts of a phone number separately. Call the structure phne. Create two structiure variables of type phone . initialize one and having the user input the value for the other one. Then display both numbers. The interchange might look like this:
Enter your area code, exchange and number: 415 555 2122

My number is (212) 767-8900

Your number is 415 555 2122
Q# 02: Create a structure called employee that contain two members, an employee number(of type int) and the employee compensation number(in dollar of type float). Ask the user to fill in this data for three employees, store it in three variables of type structure employee and then display the information for each employee.

Assignment # 06:

Q # 01: Write a function called zerosmaller() that is passed two int arguments by reference and then sets the smaller of the two numbers to 0. Write a main() program to exercise this function.
Q # 02: Write a function that takes two distance values as arguments and return the larger one. Include a main(0 program that accept two distance values from the user , compare them and display the larger.
Assignment # 07:

Q # 01: Add the time class the ability to subtract two time values using the overloaded(.)operator and to multiply a time value by a number of type float using the overloaded(.) operator.
Q # 02: Augment the time class to include overloaded increment(++) and decrement(--) operator that operate in both prefix and postfix notation and return values. Add the statement to main() to test these operators.

Download 8.79 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page