Advertisement
Guest User

luncadiana_2.cpp

a guest
Oct 18th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. int main()
  6. {
  7.  int n, aux, gasit, prim;
  8.  cout<<"n=" ; cin>>n;
  9.  aux=n-2;
  10.  while(gasit=0)
  11.   {int walker=2;
  12.    do { if (aux%walker==0)  { flag=1;
  13.                                       break;}
  14.             walker=walker+1;
  15.       } while (walker<=aux/2);
  16.  
  17. if (gasit==0) { aux=prim }
  18.  
  19. }
  20. if(aux=prim)
  21. {
  22.  if(n-aux=prim)   {
  23.  
  24.     gasit=0;
  25.     break;
  26.  } else {
  27.      aux=aux-1;
  28.  }
  29.  
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement