Noah-mohamed / basics-Javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

basics-Javascript

Assignment

1- Write a program that allow to user enter number then printit

Example Input 5

Output 5

2- Write a program that take number from user then print yes if that number can divide by 3 and 4 otherwise print no

Example1

Input 12 Output Yes

Example 2

Input 9 Output No

3- Write a program that allows the user to insert 2 integers then print the max

Example1 Input 3 5 Output 5

Example 2 Input 10 7 Output 10

4- Write a program that allows the user to insert an integer then print negative if it is negative number otherwise print positive.

Example 1 Input -5 Output negative Example2

Input 10 Output positive

5- Write a program that take 3 integer from user then print the max element and the minelement.

Example 1 Input 7 8 5 Output max element = 8 min element = 5

Example2 Input 3 6 9 Output Max element = 9 Min element = 3

6- Write a program that allows the user to insert integer number then Even or Odd

Example 1 Input 8 Output even

Example 2 Input 7 Output odd

7- Write a program that take character from user then if it is vowel chars (a,e,I,o,u) then print vowel otherwise print consonant

Example1 Input O Output vowel

Example 2 Input b Output consonant

8- Write a program that allows user to insert integer then print all numbers between 1 to that’s number

Example Input 5 Output 1, 2, 3, 4, 5

9- Write a program that allows user to insert integer then print a multiplication table up to 12.

Example Input 5

Output 5 10 15 20 25 30 35 40 45 50 55 60 ##10- Write a program that allows to user to insert number then print all even numbers between 1 to this number Example: Input 15

Output 2 4 6 8 10 12 14

11- Write a program that take two integers then print the power

Example: Input 4 3

Output 64

12- CalculateAverageofNumbersUsingArrays(assumesize=10) For

Example 2 4 5 6 7 8 9 10 11 12 Output 7.4

13- Reverse array in another array

For example 2,4,8,6,11 Print 11,6,8,4,2

14- Create function take an integer then print it .

15- Createfunctiontakethreeintegersthenreturntheaverage.

16- Createfunctiontakeanintegerthenreturntrueifthisnumberisprimeotherwise return false.

17- Createfunctiontakeanarraythenreturnsummationofitsvalues

18- Createfunctiontakecharandreturntrueifitisvowelchar(a,e,I,o,u)otherwise return false

19- Createfunctiontakestringthenreturnnumberofvowels(a,o,I,e,u)

Example: Input ahmed

Output 2

20- Createfunctiontakestringthenremoveallvowelsfromit.

Example Input “ahmed”

Output hmd

About


Languages

Language:HTML 56.8%Language:JavaScript 41.8%Language:CSS 1.4%