1. An eletronic shop has announced the following seasonal discount on the purchase of certain items.
    Purchase Amount Discount on Laptop Discount on Desktop
    0 - 2500 0.0% 5.0%
    2501 - 5700 5.0% 7.5%
    5701 - 10000 7.5% 10.0%
    More than 10000 10.0% 15.0%
    Write a program based on the above criteria, to input name, address , amount of purchase and the type of purchsed (L for Laptop and D for Desktop) by a customer. Compute and print the net amount to be paid by the customer along with his name and address.
  2. Using a switch statement, Write a menu driven program to convert a given temperature from Fahrenheit to Celsius and vice verse. For an incorrect choice, an appropriate error message should be displayed
  3. A cloth showroom has announced the following festivel discount on the purchase of items, based on the total cost of the items purchased:
    Total cost Discount (%)
    Less than Rs. 2000 5%
    Rs.2001 to Rs.5000 25%
    Rs.5001 to Rs.10000 35%
    Above Rs.10000 50%
    Write a program the total cost and to compute and display the amount to be paid by the customer after availling the discount.
  4. An electricity board charges the bill depending on the number of units consumed as follows:
    Units Charge
    First 100 units 40 p per unit
    Next 200 units 60 p per unit
    Above 200 units Rs. 1 per unit
    WAP to print the net bill to be paid by a consumer. The net bill includes a rent of Rs 250.00 charged from a consumer.
  5. Write a program that returns the commission in Rs for a salesman:
    The commission is based on the following conditions
    Sales Commission
    Less than Rs 5000 5%
    Rs. 5000 to Rs 10000 8%
    Above Rs. 10000 10%
  6. Write a program to accept a student's name, his marks in three subjects and print his result sheet in the follwoing format:
    NAME ENGLISH COMPUTER MATH TOTAL GRADE
    XXXXX XXXXXX XXXXXX XXXX XXXXXX XXXXX
    Assign grade to the student based on the following grade scale:
    Percent < 50 D
    Percent >= 50 but < 60 C
    Percent >= 60 but < 80 B
    Percent >= 80 A
  7. Write a program to compute and display the roots of a quadratic equation of the form ax2+bx+x.
    if b2-4ac results a negative answer, print IMAGINARY ROOTS.
    If b2-4ac gives a positive result, print REAL AND DISTINCT ROOTS.
    If b2-4ac=0, print EQUAL ROOTS
  8. A cloth showroom has announced the following festivel disocunt on purchase of items:
    Amount of purchase Mill Cloth Disocunt(%) Handloom Disocunt(%)
    Less than Rs.1000 2% 5%
    Rs.1000 to Rs.5000 20% 25%
    Rs.5001 to Rs.10000 40% 50%
    Above 10000 50% 60%
    Write a program compute the net amount paid by the customer. assume all required values to be inputted by the user. make use of if and switch structure.
  9. An employee to pay an income tax based on his gross annual income as follows:
    Annual gross income Annual tax deduction %
    Less than or equal to Rs 10000 0%
    10001 to 50000 Rs. 1000 + 10% of income
    50001 to 80000 Rs. 5000 + 20% of income
    Greater than 80000 Rs. 10000 + 30% of income
    Write a program and print the tax payable by a salaried person.
  10. Write a program to accept the member_ID, member_name, book_name and compute the fine for member. the fine is calculated depending on the number of days a book is returned late:
    Days Fine per day in Rupees
    First 10 Days Rs.1
    First 10 Days Rs.5
    Later than 20 Days Rs.8
  11. Write a program to Compute the railway fare depending on the criteria as given below:
    Fare depending on the criteria as given below:
    Age (in years) Distance (in Kms) Fare (in Rupees)
    Below 10
    Below 10 Rs. 5
    Between 10 and 50 Rs. 20
    Above 50 Rs. 50
    Between 10 and 60
    Below 10 Rs. 10
    Between 10 and 50 Rs. 40
    Above 50 Rs. 80
    Above 60
    Below 10 Rs. 4
    Between 10 and 50 Rs. 15
    Above 50 Rs. 35
  12. Write a program to compute the amount that a customer pays for the taxi that he hires based o the following conditions:
    Kms travelled Amount per km
    Upto less or equal to 1 km 25
    More than 1 to 6 km 10
    More than 6 to 12 km 15
    More than 12 to 18 Km 20
  13. Write a program to display the color of the spectrum(VIBGYOR) according to the user's choice.
  14. Write a program to accept two angles. Calculate and display whether they are 'complementary angles' or 'supplementary angles' as per as the user's choice.
  15. 'Atul Transport Company' charges for the parcels from delhi to kolkata or vice versa as per the given tariff:
    Weight Charge
    Up to 10kg. Rs. 20 per kg.
    for the next 20kg. Rs. 10 per kg.
    for the next 20kg. Rs. 8 per kg.
    More than 50kg. Rs. 5 per kg.

Javascript Knowledge

JavaScript (JS) is a computer programming language that is used to create dynamic and interactive websites and applications. It is one of the three core technologies of the World Wide Web, along with HTML and CSS.

Quick Links-
Home | Basic JS | IF-Else JS | If-else JS P2 Looping

NEWSLETTER

CONTACT

+91 9051378814

 Copy Rights 2023 Mr Dey Roy. All Rights Reserved.