Write a program that ask a user to input a number and display whether the number is divisible
by 2, 3, 5, and 7.
Answers
Answered by
1
First of all before writing a program you should be clear about which logic you should use for the given problem in the program.
Here you should first input a number from the user. Second you should apply the logic of modulus as it gives the remainder in the division method. By putting if else and using the remainder condition in if you can easily display the text wether it is divisible or not.
mark me as brainlist
Similar questions
Social Sciences,
24 days ago
Geography,
24 days ago
Political Science,
24 days ago
History,
1 month ago
Science,
9 months ago
Physics,
9 months ago
Math,
9 months ago