Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int n;
  9. int p;
  10. int S;
  11. char A[n];
  12.  
  13. for(int i=0;i<n;i++)
  14. {
  15. for(int j=1;j<n-i;j++)
  16. {
  17. if(A[j-1]>A[j])
  18. {
  19. swap(A[j-1],A[j]);
  20. }
  21. }
  22. }
  23. for (int i=0;i<n;i++)
  24. {
  25. for(int j=1;j<n-1;j++)
  26. {
  27. if((A[i]*A[j])%p==0)
  28. {
  29. S=A[i]*A[j];
  30. }
  31. }
  32. }
  33.  
  34.  
  35.  
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement