Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- //https://otvet.mail.ru/question/218027254
- int main()
- {
- int count,flag;//2,2,3
- double i,n = 28;
- count = flag = 0;
- for(i=2;i<=n;i++)
- {
- if(i==n&&!flag)
- {
- printf("sorry,it's not\n");
- }
- else if(!fmod(n,i))
- {
- printf("%c %d ",(!flag)?' ':'*',(int)i);
- n/=i--;
- flag++;
- count++;
- }
- else if(n<10)//if cifra
- {
- printf("* %d\nhurray,it dividable!\n",(int)n);
- i=n;
- count++;
- }
- }
- printf("dividers count is-%d\n",count);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement