Home
Basic
If-Else
Looping
Search
-- Programmer Analyst --
Basic Question for JavaScript
1.Write a program to display your name .
2.Write a program to display first name and last name in different line .
3.Write a program to display your name and your age in different line using one output statement .
4.Write a program find the addition od two number .
5.Write a program to accept 5 subject numbers and find their sum and average.
6.Write a program to accept 2 numbers and swap them using third variable.
7.Write a program to accept 2 numbers and swap them without using third variable.
8.Write a program to accept length and Breadth of a rectangle and find area and perimeter of a rectangle.
9.Write a program to accept the temperature in centigrade degree and find the temperature in fahrenheit degree.
10.Write a program to accept the temperature in fahrenheit degree and find the temperature in centigrade degree.
11.Write a program to accept any character and find their ASCII code.
12.Write a program to accept the basic salary of an employee and find the HRA, DA, TA, PF, GS, NP from the from the following criteria:
HRA = 10% od basic salary
DA = 5% od basic salary
TA = 15% od basic salary
PF = 20% od basic salary
GS=HRA+DA+TA+BASIC SALARY
NP=GS-PF.
13.A computer shop announce a special offer to their customers on purchasing laptops and printers accordingly...
On laptop discount 15 [Discount Amount = (Discount Percentage x Price)/100]
On printer discount 10
Write a program calculate the discount, if customer purchases a Laptop and a printer.
14.Write a program to accept days and find year, month, weeks and remaining days .
15.Write a Program to accept perpendicular and base of a right angle triangle. And calculate hypotenuse, area ,perimeter of a triangle.
[area=length*breadth / perimeter = 2*(length + breadth)]
16.A shopkeeper offer 10% discount on the printer price of a digital camera. However a customer has to pay 6% sales tax on the remaining amount. Write a program to calculate the amount to be paid by the customer taking print as an input.
17.A shopkeepers offers 30% discount on purchasing articles whereas the other shopkeepers offers two successive discount 20% and 10% for purchasing the same articles . Write a program to compute and display which is better offer for a customer. Take the price of an article as an input.
©2023 Programmer Analyst.All Right Reserved.