Skip to content

FalakShair01/Javascript-Function-

Repository files navigation

Javascript-Function-

It conains Following Tasks :

Q1): While purchasing certain items,a discount of 10% is offered if the quantity purchased is more than 1000. If quantity and price per item are input through the keyboard, write a program to calculate the total expenses.

Q2): The current year and the year in which the employee joined the organization are entered through the keyboard. If the number of years for which the employee has served the organization is greater than 3 then a bonus of Rs. 2500/- is given to the employee. If the years of service are not greater than 3, then the program should do nothing.

Q3): A company insures its drivers in the following cases:
− If the driver is married. − If the driver is unmarried, male & above 30 years of age. − If the driver is unmarried, female & above 25 years of age. In all other cases the driver is not insured. If the marital status, sex and age of the driver are the inputs, write a program to determine whether the driver is to be insured or not.

Q4): Write a program to Calculate the salary as per given table

Q5): If cost price and selling price of an item is input through the keyboard, write a program to determine whether the seller has made profit or incurred loss. Also determine how much profit he made or loss he incurred.

Q6): Any integer is input through the keyboard. Write a program to find out whether it is an odd number or even number.

Q7): Any year is input through the keyboard. Write a program to determine whether the year is a leap year or not.

Q8): If the ages of Ali, Sarah and Ahmed are input through the keyboard, write a program to determine the youngest of the three.

Q9): Given the length and breadth of a rectangle, write a program to find whether the area of the rectangle is greater than its perimeter. For example, the area of the rectangle with length = 5 and breadth = 4 is greater than its perimeter.

Q10): Write a program to check whether a triangle is valid or not, when the three angles of the triangle are entered through the keyboard. A triangle is valid if the sum of all the three angles is equal to 180 degrees.

Q16) : Take two number through keyboard and perform arithmatic operation using Functions:

Q17): Take thre number and return the minimum and maximum using Functions.

Q18): Take a number and check whether it is even or odd using function .

Q19): Take three number through keyboard and return the sum and average of the numbers using Function

About

Functions | Javascript | Html

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages