/*Question 3: Power of Two
Write a program that takes an integer as input and returns true if the input is a power of two.
Examples:
8=> returns true
6=> returns false*/
function divisiblity(){
var a =prompt('Enter a number');
var results;
if (a%2===0){
results='a divisible of 2';
alert('true')
}
else{
results='not a divisible of 2';
alert('false')
}
document.write(results);
}
-
Notifications
You must be signed in to change notification settings - Fork 0
VictorNjeru49/question_three-
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published