Thursday, May 8, 2014

c++ Assignment XI Class (IF statement)


Class XI – IF statement assignment. Date of Submission : 4th July 2014
  1. Find the hypotenuse of a right triangle when two sides are given.
           Clue : sideC = sqrt(sideA*sideA+sideB*sideB);
  1. Input Unit Cost of Item, Quantity bought. Find Total Amount, VAT (12.5 % of Total amount) , Amount to be paid.
  1. Input 2 values in 2 variables and swap the values in 2 variables (using temp variables) .
  2. Input 2 values and swap without using temporary  variable.
  1. A library charges fine according to the following criterion:
                      first 5 days-                  50 paise per day  
6-10 days-               80 paise per day
                  Beyond 10 days-       Rs. 2.00  per day  
  1. Input 3 numbers and print their sum, average, product as per user’s choice.
  1. Input marks in 5 subjects. Calculate Total marks, Percentage. If Percentage is atleast 70, Display “welldone” Otherwise display “Work Hard”.
  1. Find Square or Cube of an input number as per the user’s choice.
  1. Input Coefficients of a Quadratic Equation. Print Discriminant and type of roots . Also display the roots in case of real roots.
  1. Let the user enter choice of converting temperature from Celcius to Fahrenheit or vice versa. Then let the user enter temperature . The output should be the temperature required.
  1. Create payslip. Input name, basic pay and whether the employee uses Office Conveyance(Ask Y/N). If he/she uses office conveynce, he/she does not get a vehicle allowance of Rs. 400.00 Calculate
DA as 59% of Basic Pay
HRA as Rs. 800.00
Deductions as 10% of Total Pay.
  1. A ticket’s regular price is Rs. 100. Those below 16 years get 10% discount. Those above 70 years get 30% discount. Let the user enter age. Display discount amount and ticket amount to be paid.
  1. Give user the option of three streams :
Medical, Non Medical, Commerce. (Let the user choose 1/2/3). If user chooses Medical(1), ask marks in Maths and Science. If user chooses non –medical(2), ask marks in maths only. If user chooses Commerce(3), ask marks in Maths and Social Studies.   For Medical, marks in Maths and Science together should be above 75%. For Commerce, marks in Maths and Social Science together should be above 60%. For Non Medical, marks in Science should be above 65%. Display whether the stream is allocated or not.

No comments:

Post a Comment