2 Topics

Member Avatar for
Member Avatar for abhishekagrawal

Hi All, I am writing a program to find the number between 1 and 100 that has the greatest number of distinct divisors. Below is my code for the same. It is returning an erroneous answer, i.e. 8 for greatest number of distinct divisors and 4 as the number for …

Member Avatar for nullptr
0
189
Member Avatar for abhishekagrawal

Dear All, I have written a program to find the smallest divisor of an input number. The code gives me an error in lines 19 and 23. The error is invalid operands to binary %. Please help me to troubleshoot, thank you. Below is my code: #include<stdio.h> #include<stdlib.h> #include<math.h> int …

0
194

The End.