Code:
#include <stdio.h>
#include <math.h>
#include <ctype.h>
int main (void) {
float n, cnt, sum_div;
char ans;
do{
printf("-------------------\n");
printf("Enter a number:");
scanf("%f", &n);
for(cnt = 2.0f, sum_div=0.0f; (fmod(n,cnt)==0)&&cnt<=n/2.0)
{
printf("Divisors: %f,\n", cnt);
sum_div+=cnt;
if(sum_div==n)
printf("---%f is Perfect\n", n);
else if(sum_div>n)
printf("---%f is Abundant\n", n);
else
printf("---%f is Defficient\n", n);
}
printf("Continue? <Y/N>:\n");
scanf(" %c", &ans);
} while(toupper(ans)=='Y');
printf("Bye:>_\n");
return(0);
}
I changed some of the code around so we can read it. And now is it at least compileable?