JavaScript: Check from two given non-negative integers that whether one of the number is multiple of 7 or 11
JavaScript Basic: Exercise-46 with Solution
Check if Only One Integer is Multiple of 7 or 11
Write a JavaScript program to check two given non-negative integers if one (not both) is a multiple of 7 or 11.
This JavaScript program examines two non-negative integers to determine if exactly one of them, but not both, is a multiple of 7 or 11. If only one of them satisfies this condition, it returns true; otherwise, it returns false.
Visual Presentation:

Sample Solution:
JavaScript Code:
Output:
false true false
Live Demo:
Flowchart:

ES6 Version:
For more Practice: Solve these Related Problems:
- Write a JavaScript program that checks if exactly one out of two non-negative integers is a multiple of 7 or 11.
- Write a JavaScript program that verifies if only one of two given numbers is divisible by either 7 or 11.
- Write a JavaScript program that determines if one (but not both) of two integers is a multiple of 7 or 11 and returns a boolean.
Improve this sample solution and post your code through Disqus.
Previous: JavaScript program to check two given integer values and return true if one of the number is 15 or if their sum or difference is 15.
Next: JavaScript program to check if a number in the range 40..10000 presents in two number (in same range).
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.