0% found this document useful (0 votes)
8 views

Javascript Practicle Program

Uploaded by

chauhanamit5018
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Javascript Practicle Program

Uploaded by

chauhanamit5018
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

List of JavaScript Practical Programs

1. Write a program to print your name and address on your screen.


2. Write a program to initialize value in integer, float and character and print
on screen.
3. Write a program to get values from user using prompt function.
4. Write a program to use arithmetic operator. (+,-,*,/,%)
5. Write a program to use relational operator. (<,>,<=,>=,= =,!=)
6. Write a program to use Increment/Decrement operator. (Prefix: ++a,--a
Postfix : a++,a--)
7. Write a program to input two numbers and print its square and cube.
8. Write a program to find simple interest.((P*R*N)/100)
9. Write a program to calculate the area of circle.(3.14*r*r)
10.Write a program to calculate the area of triangle.((b*h)/2)
11.Write a program to calculate the formula. (c+d)*(g+h).
12.Write a program to find compound interest. p*(1+(r/100)/n).
13.Write a program to swap 2 numbers using 3rd variable.
14.Write a program to swap 2 numbers using those 2 numbers. (Use math opr)

15.Write a program to input age and check age is greater than 18. (Using only
if).
16.Write a program to input age of student and print the student having age
less than 21 or greater than 21.(Using if else)
17.Write a program to input 2 numbers and print the maximum among them.
(Using if else).
18.Write a program to input 2 numbers and print the minimum among them.
(Using if else).
19.Write a program to input number from user and print it is odd or even.
(Using if else).
20.Write a program which takes full year and prints whether it is leap year or
not. (Using if else)
21.Write a program to input a character and print that is vowel or consonant.
(Using if else)
22.Write a program to get a character in lower case and print in upper case or
get character in upper case and print in lower case.
23. Write a program to enter number and check it is positive, negative or zero.
(Using else if)
24.Write a program to input 3 number and print the maximum among
them.(Using else if)
25.Write a program to input 3 number and print the minimum among
them.(Using else if)
26.Write a program to make mark sheet of student.
List of JavaScript Practical Programs

Get roll_no, name, sub1_mark, sub2_mark, sub3_mark from user.


Print all detail with total of subject marks, percentage and result.

27.Write a program to make a G.K. test using switch case.


Who developed ‘C’?
A. Ken Thompson B. Dennis Ritchie
C. Martin Ritchard D. Peter Norton
28.Write a program to print week day in word using switch case.
1. Sunday
2. Monday
…………….
7. Saturday
29.Write a program to get 2 numbers and print its addition, subtraction,
multiplication and division using switch case.
1. addition
2. subtraction
3. multiplication
4. division
30.Write a program to make a program of Banking using switch case.
1. balance check
2. withdraw
3. deposit
4. exit
31.Write a program to get a character and print it is vowel or consonant.(Using
switch case)
32.Write a program to use goto label.

33.Write a program to print 1 to 10.(using for, while and do while)


34.Write a program to print 10 to 1. (using for, while and do while)
35.Write a program to print 2,4,6,8,___n.
36.Write a program to print 3,5,7,9,___n.
37.Write a program to print 1,2,4,8,16,32,64.
38.Write a program to print 1,10,2,9,3,8,4,7,5,6.
39.Write a program to print 1,11,20,28,35,41,46,50,53,55.
40.Write a program to print the total of 1 to 10.
41.Write a program to print the total of first 100 even numbers.
42.Write a program to print the total of first 100 odd numbers.
43.Write a program to print the total of 1 /2 +2/3 +…..+9/10.
44.Write a program to print the total of 1-2+3-4+5-6+7-8+9-10.
List of JavaScript Practical Programs

45.Write a program to print the total of 0.1+0.02+0.003+0.0004+0.00005.


46.Write a program to get 1 number and display its reverse.
47.Write a program to get 1 number and display sum of its digit.
48.Write a program to get 1 number and display its factorial.
49.Write a program to get 1 number and find that it’s prime or not.
50.Write a program to print 0 1 1 2 3 5 8 13 21 34 55(Fibonacci series).
51.
*****
*****
*****
*****
*****
52.
12345
12345
12345
12345
12345
53.
11111
22222
33333
44444
55555
54.
1 2 3 4 5
2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
55.
AAAAA
BBBBB
CCCCC
DDDDD
EEEEE
56.
List of JavaScript Practical Programs

ABCDE
ABCDE
ABCDE
ABCDE
ABCDE
57.
*
**
***
****
*****
58.
1
22
333
4444
55555
59.
1
12
123
1234
12345
60.
5
54
543
5432
54321
61.
1
21
321
4321
54321
62.
List of JavaScript Practical Programs

1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
63.
1
01
010
1010
10101
64.
1
10
10 1
10 1 0
10 1 0 1
65.
a
bc
def
ghij
klmno
66.
a
bb
ccc
dddd
eeeee
67.
z
yx
wvu
t s r q
p o n m l
68.
List of JavaScript Practical Programs

1
10
100
1000
10000
69.
5
45
345
2345
12345
70.
*****
****
***
**
*
71.
12345
1234
123
12
1
72.
1 2 3 4 5
2 4 6 8
3 6 9
4 8
5
73.
54321
5432
543
54
5
74.
List of JavaScript Practical Programs

54321
4321
321
21
1
75.
12345
2345
345
45
5
76.
55555
4444
333
22
1
77.
abcd e
bcd e
cde
de
e
78.
*
**
***
****
*****
79.
1
22
333
4444
55555
80.
List of JavaScript Practical Programs

1
12
123
1234
12345
81.
5
54
543
5432
54321
82.
a
bb
ccc
dddd
eeeee
83.
*
* *
* * *
* * * *
* * * * *

84.Write a program to initialize a single dimension array with 5 elements and


display it.
85.Write a program to get 5 numbers in a 1D-array and display it.

You might also like