Skip to the content
Why JAVASCRIPT?
How to write and run Javascript
How to Add Javascript to Webpage
Representing data with values
Primitive Data Types
Operators
Expressions
Statements
Arrays
Conditional statements
- 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.
- Write a program to check whether a number is a perfect square.
- Write a program to check whether a number is a perfect cube.
- Write a program to check whether an array contains a perfect square and is also an odd number at the last index.
- Write a program to print only the multiples of 2 and 3 between 1 and 50.
- Write a program to check whether an array contains strings.
- Write a program to print only those numbers from an array that contain 2 or 4 in the unit’s place.
- Write a program to check whether all the numbers in an array are prime or not.
- Write a program to check whether any string in an array has the letter ‘i’ in it.
- Write a program to check whether the first and last elements in an array are boolean values.
- Write a program to print all the multiples of 2 that don’t contain 0 at the unit’s place between 1 and 50.
Loop statements
- 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.
- 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 the number of factors of 24 using while loop(number of factors for 24 is 8).
- 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.
- Write a program to print multiplication table of 6.
- Write a program to print factorial of a given number.
- Write a program to print all the factors of a given number.
- Write a program to print the count of factors of a given number.
- Write a program to check a given number is a prime number or not.
- Write a program to print reverse of digits of a number.
- Write a program to read 5 numbers and print the maximum and minimum number.
- Write a program to read 5 numbers and print the sum of all entered numbers.
- Write a program to print average of n numbers.
- Write a program to read 5 numbers and print only the even numbers.
- Write a program to print the Fibonacci number series up to a given number.
- Write a program to check a given number is Armstrong number or not.
- Write a program to print the reverse of a given number.
- Write a program to check a given number is palindrome number or not.
- Write a program to print the number at 100’s place.
- Write a program to print the nCr of given ‘n’ and ‘r’ values.
- Print the largest digit of given number.
- Print the number of digits in a given number.
- Print the sum of all digits of a given number.
- Print the binary value of 8.
- Write a program to print only even digits of a given number.
- Write a program to print only odd digits of a given number.
- Write a program to print only digits out of a given string.(For example: ‘MH43AB3209’)
- Print the squares of all numbers from 1 to 10.
- Print the cubes of all numbers from 1 to 10.
- Write a program to find the sum of all prime numbers between 1 and 50.
- Write a program to find the product of all odd numbers between 1 and 10.
- Write a program to count the number of ‘1’s in a given number.
- Write a program to eliminate all zeroes from a given number.
- Write a program to print all the digits that are less than 5 in a given number.
More loops assignments
Related