Advertisement
Kawsar_Hossain

Untitled

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