Advertisement
Kawsar_Hossain

Untitled

Mar 21st, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int t;
  5. int a,b,c;
  6. scanf("%d", &t);
  7. int d=0;
  8. for(int i=0;i<t;i++)
  9. {
  10. scanf("%d %d", &a,&b);
  11. if(b==0)
  12. {
  13. printf("Case %d: not divisible\n",++d);
  14. continue;
  15. }
  16.  
  17. c=a/b;
  18.  
  19.  
  20. if(c*b!=a)
  21. {
  22. printf("Case %d: not divisible\n",++d);
  23. }
  24. else
  25. {
  26.  
  27. printf("Case %d: divisible\n",++d);
  28. }
  29. }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement