Skip to content

Latest commit

 

History

History

2022_01_29_CClass-3

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

C Class 3

.. Previous Page

Class recording: Here

PPT: Here

January 29th, 2022

C language logo

Tasks

Offline

  1. Write a program (WAP) to accept a number from user and display it is a Negative number or positive number or zero.

  2. WAP to accept a number from user and check if it is a multiple of 8 or not.

  3. WAP to accept Selling Price and Cost Price of a product. In case of profit, display the profit amount and profit percentage. In case of loss, display the loss amount and loss percentage.

  4. WAP to accept an alphabet from user. If the alphabet is in lower case, convert it to upper case. If the alphabet is in upper case, convert it to lower case.

  5. WAP to accept temperature in Celsius and convert it to Fahrenheit.

  6. A company pays its employees as per the given criteria:

    • If his basic salary is less than ₹1500, then HRA = 10% of basic salary and DA = 90% of basic salary.
    • If his basic salary is equal to or more than ₹1500, then HRA = ₹500 and DA = 98% of basic salary.

    WAP to take employee's salary as input from user and display the gross salary.

    Where gross salary = basic salary + HRA + DA.

  7. WAP to accept basic salary of a person. Calculate and display income tax to pay as per given criteria:

    Annual Salary Income tax
    <= ₹2,50,000 0
    > ₹2,50,000 and <= ₹5,00,000 10%
    > ₹5,00,000 and <= ₹10,00,000 20%
    > ₹10,00,000 30%

    Where:

    • annual salary = monthly salary * 12.
    • monthly salary = basic salary + HRA + DA - INS - PF
    • DA (dearness allowance) = 115% of basic salary
    • HRA (house rent allowance) = 25% of basic salary
    • PF (provident fund) = 10% of basic salary
    • INS (insurance) = 12% of basic salary

On HackerRank

  1. Sum and Difference of Two Numbers
  2. Playing with Characters
  3. Conditional Statements in C

{% include disqus.html %}