Code CODO

Chapter:- If-Else [JAVA SCRIPT]

If-Else Programming in Java Script

(1). Write a program to accept any number and check the number is positive or negative.

(2). Write a Program to accept any number and check the number is odd or even.

(3). Write a Program to accept any number and check the number is leap year or not.

(4). Write a Program to accept two number and find the largest number between them.

(5). Write a Program to accept three number and find the largest number between them.

(6). Write a program to accept a number and check the number is buzz or not.

(7). Write a program to accept a character and check the character is upper case, lower case, Digit or special symbol or not.

(8). Write a program to accept the basic salary of an employee and check the salary is greater then 20000 or not. If the salary is greater then 20000 then find HRA=20% of basic salary; DA=15% of basic salary; Other wise HRA=30% of basic salary; DA=25% of basic salary;.

(9). Write a program to accept three angles of a triangle and check the triangle is valid or not. The triangle is valid if the total of three angle = 180 degrees.

(10). Write a program to accept three angle of a triangle and check the triangle is isosceles, equilateral, scalene.

(11). Write a program to accept day number from the user and print the corresponding day name.

(12). Write a program to accept a age of 4 students and find who is smaller.

(13). Write a program to accept cost price and selling price of an item and determine the seller has made profit or insecure loss and also determine how much profit he made or loss he insecure.

(14). Write a program to accept marks of any one subject & find grade from the given condition. >= 90 - A; >= 80 and < 90 - B;>= 60 and < 80 - C;>= 40 and < 60 - D; < 40 - F.

(15). Write a program to accept a Consonant and check whether it is a vowel or consonant.