English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2. Write a condition (pseudocode) that expresses whether or not a number is divisible by 7.

2007-10-03 10:44:11 · 3 answers · asked by sdc 1 in Science & Mathematics Mathematics

3 answers

Hi Roc,

do I get to use the MOD function :-D

if mod(x, 7) = 0 then
printf('it's divisible by seven');
else
printf('it is not divisible by seven');

hth.

REgards,
Chas.

2007-10-03 10:48:48 · answer #1 · answered by Chas. 3 · 0 0

LCM of four, 6 and seven = eighty 4 the extensive variety = 2 mod eighty 4 = 2 or 86 or a hundred and seventy or 254 or... in case you meant for the extensive variety to be decrease than one hundred and branch with the help of the three numbers did not effect in 0, N = 86. answer then could be = 86 mod 11 = 9

2016-10-20 22:49:29 · answer #2 · answered by koltay 4 · 0 0

Input n

If int(n/7)<>(n/7) then n is not divisible by 7.

2007-10-03 10:48:08 · answer #3 · answered by Mathsorcerer 7 · 0 0

fedest.com, questions and answers