Javascript Progamming Foundation Logic Development
-
if else, switch case and Loops
use if...else statements to solve the following problems
-
Write a program to check a number is divisible by 7 or not.
-
Write a program to check a number is factor of 84 or not.
-
Write a program to check a number is factor of 96 or not.
-
and if the given number is more Than 96 program should say ‘not a valid input’
-
Write a program to check a number is multiple of 3 or not.
-
Write a program to check a number is positive or not.
-
Write a program to check a number is having 4 at units place (984).
-
Write a program to check a number is 3 digited number or not.
-
Write a program to print even or odd for a given number
-
Write a program to print the greatest number in given two numbers
-
Write a program to print the least number in given two numbers
-
Write a program to print the given two numbers in ascending order
-
Write a program to print the given two numbers in descending order
-
Write a program to print the greatest number in given three numbers
-
Write a program to print the least number in given three numbers
-
Write a program to print the given three numbers in ascending order
-
Write a program to print the given three numbers in descending order
-
Write a program to take marks of three subjects and print the grade of student
-
Character Is Vowel or Consonant
-
A Character Is an Alphabet or Not
-
Uppercase, Lowercase, Special Character, or Digit
-
Leap Year
-
The Date Is Correct or Not
-
Voting Eligibility Checker
-
Check whether a number is negative, positive or zero.
-
Check whether a number is divisible by 5 and 11 or not.
-
Input any alphabet and check whether it is vowel or consonant.
-
Input any character and check whether it is the alphabet, digit or special character.
-
Check whether a character is an uppercase or lowercase alphabet.
-
Input week number and print weekday.
-
Input month number and print number of days in that month.
-
Count the total number of notes in a given amount.
-
Input angles of a triangle and check whether the triangle is valid or not.
-
Check whether the triangle is an equilateral, isosceles or scalene triangle.
Use Loops to get the output for the following programming questions
iteration
-
Write a program to print 1 to 10 numbers using a while loop
-
Write a program to print 10 to 1 numbers using a while loop
-
Write a program to print 5 to 15 numbers using a while loop
-
Write a program to print 15 to 10 numbers using a while loop
-
Write a program to print 1 to 10 even numbers using a while loop
-
Write a program to print 1 to 10 odd numbers using a while loop
-
Write a program to print first ten multiples of 4 using a while loop
(multiples of 4 are 4,8,12,16,20,.....)
-
Write a program to print multiplication table of 6 using while loop
-
Print the squares of all numbers from 1 to 10.
-
Print the cubes of all numbers from 1 to 10.
-
Write a program to print factors of 24 using while loop
(factors of 24 are 1,2,3,4,6,8,12,24)
-
Write a program to print 1 to 10 numbers using a for loop
-
Write a program to print 10 to 1 numbers using a for loop
-
Write a program to print all numbers from 1 to a given number
-
Write a program to print 1 to 10 even numbers using a for loop
-
Write a program to print 1 to 10 odd numbers using a for loop
-
Write a program to print first 10 multiples of 3 using a for loop
-
Write a program to print multiplication table of 6 using a for loop
-
Write a program to print all the factors of a given number
-
a program to read 5 numbers and print the maximum and minimum number
-
a program to read 5 numbers and print only the even numbers
-
Print all the digits of a given number
-
Write a program to print only even digits of a given number
The output should be 4,2,6
Ex. Let us take 154256
-
Write a program to print only odd digits of a given number
Ex. Let us take 1542763
The output should be 1,5,7,3
-
Write a program to print the number at 10’s place
-
Write a program to print the number at 100’s place
-
Write a program to print the number at 1000’s place
-
Write a program to print the number at 10000’s place
-
Write a program to find the LCM of given two numbers
-
Write a program to convert an octal number to a decimal
Accumulation
-
Write a program to print the sum of 1 to 10 ( initialisation of sum variable with 0 )
-
Write a program to print the average of 1 to 10
-
Write a program to print the sum of the numbers between the given two numbers
-
Write a program to print the sum of even numbers between the given two numbers
-
Write a program to print the sum of odd numbers between the given two numbers
-
Write a program to print the product of the numbers between 1 to 10 ( initialisation of product
variable with 1 )
-
Write a program to find the product of all odd numbers between 1 and 10.
-
Write a program to print the nth power of a given number. n can be any positive number.
(n=3 r =4 then answer must be 3*3*3*3 )
-
Write a program to print factorial of a given number
-
Write a program to print the nCr of given ‘n’ and ‘r’
-
Write a program to print the number of factors of 24 using while loop
(number of factors for 24 is 8)
-
Write a program to print the count of factors of a given number using for loop
-
Write a program to check a given number is a prime number or not
-
a program to read 5 numbers and print the sum of all entered numbers
-
a program to read 5 numbers and print average of n numbers
-
print Number of Digits in given number.
-
Write a program to count the number of ‘1’s in a given number.
-
Write a program to eliminate all 0’s from a given number.
-
Write a program to print all the digits that are less than 5 in a given number.
-
Print the greatest digit of a given number(n=1237456 then greatest digit is 7)
-
sum of all digits of a given number
Ex: let us take 19345 is the given number
The output should be 22
(1+9+3+4+5)=22
-
a program to print reverse of digits of a number
-
print the binary value of 8.
-
Write a program to convert a binary number into a decimal number
-
Write a program to check a given number is palindrome number or not
-
Write a program to check a given number is armstrong number or not
Ex:153 is an armstrong number
-
Write a program to print the fibonacci number series up to a given number
Expected output:0 1 1 2 3 5 8 13
-
Print A Calendar Taking Input From User Using Loop
Switch-case
-
Temperature Conversion Celsius To Fahrenheit And Vice Versa
-
Calculator
-
Find A Grade Of Given Marks or (Find a Grade of Given Marks Using Switch Case)
-
Find Radius, Circumference and Volume of Cylinder
-
Remove All Vowels From A String
-
Print day of week name using switch case.
-
Print total number of days in a month using switch case.
-
Check whether an alphabet is a vowel or consonant using a switch case.
-
Find the maximum between two numbers using the switch case.
-
Check whether a number is even or odd using a switch case.
-
Check whether a number is positive, negative or zero using a switch case.
-
Find roots of a quadratic equation using switch case.
-
Create a Simple Calculator using a switch case.
Advanced and nested loops
-