fork download
  1. #include <stdio.h>
  2. #include <locale.h>
  3.  
  4. int del(int a, int b)
  5. {
  6. int res = a / b;
  7. if (res * b == a)
  8. return 1;
  9. else
  10. return 0;
  11.  
  12. }
  13.  
  14. int main()
  15. {
  16. setlocale(LC_ALL, "RU");
  17. int a = 10, b = 2;
  18.  
  19. if (del(a, b))
  20. printf("\n %d делиться на %d надцело", a, b);
  21. else
  22. {
  23. printf("\n %d не делиться %d надцело", a, b);
  24. }
  25.  
  26. return 0;
  27. }
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
 10 делиться на 2 надцело