+ 1

Write a program to check given number is divisible by 9 or not?

Conditions :: You can't use modulo and division operator ..

10th Jan 2020, 9:55 AM
Rajesh Rabari
Rajesh Rabari - avatar
4 Antworten
+ 13
Start incrementing a number 'i' from 1 and if i*9 == k then it's divisible. [quick 'n' dirty]
10th Jan 2020, 9:58 AM
Valen.H. ~
Valen.H. ~ - avatar
+ 2
Thank you may be last one is efficient solution.
10th Jan 2020, 10:46 AM
Rajesh Rabari
Rajesh Rabari - avatar