write a qbasic program to check whether the number is divisible by 3 but not by 7
Answers
Answered by
0
Answer:
10 INPUT NUMBER
20 IF NUMBER/3 = INT(NUMBER/3) AND NUMBER/7 = INT(NUMBER/7) PRINT “DIVISIBLE BY 3 AND 7”:GOTO 40
30 PRINT “NOT DIVISIBLE BY 3 AND 7”
40 END
This one is to check whether it is exactly divisible by both 3 and 7. If you want to check if it is exactly divisible by either 3 or 7 or both, just replace AND by OR in line 20 and change the PRINT statements accordingly.
Answered by
0
Explanation:
oadvxivdcidvduebfvdiebdiwboe feiebf
Attachments:
Similar questions
Math,
19 hours ago
Math,
19 hours ago
Hindi,
1 day ago
Environmental Sciences,
8 months ago
Math,
8 months ago