Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- /*int x;
- cout<<"adj egy szamot megmondom prim-e? ";
- cin>>x;
- int i=2;
- while( x%i!=0 ){
- i++;
- }
- if( i<x) cout<<"nem prim";
- else cout<<"prim";
- */
- int x;
- cout<<"adj egy szamot megmondom prim-e? ";
- cin>>x;
- cin>>y;
- int lnko=1;
- int i=2;
- //int db=0;
- while( i<=x && i<=y){
- if(x%i==0 && y%i==0) lnko=i; //cout<<i<<" ";
- i++;
- }
- if( ) cout<<"nem prim";
- else cout<<"prim";
- //x==i prim ....
- /*int x;
- cout<<"Gondoltam egy egesz szamra 1-100 kozott";
- do{
- cin>>x;
- if(x>i) cout<<"A gondolt szam kisebb "<<endl;
- if(x<i) cout<<"A gondolt szam nagyobb "<<endl;
- }while(x!=i);
- cout<<"siker";
- */
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment