SHARE
TWEET

tiri

a guest Oct 15th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     //VĂ©rification de l'adresse ip (si chaque partie est entre 0 et 255)
  2.     if(a>255 || a<0)
  3.         cout << "Erreur: " << a << " n'est pas compris entre 0 &255" << endl;
  4.     if(b>255 || b<0)
  5.         cout << "Erreur: " << b << " n'est pas compris entre 0 &255" << endl;
  6.     if(c>255 || c<0)
  7.         cout << "Erreur: " << c << " n'est pas compris entre 0 &255" << endl;
  8.     if(d>255 || d<0)
  9.         cout << "Erreur: " << d << " n'est pas compris entre 0 &255" << endl;
  10.  
  11.     //Recherche de la classe de l'adresse IP
  12.     if(a>=1 && a<=127) //Classe A
  13.         cout<<"Adresse de Classe A"<<endl;
  14.     if(a>=128 && a<=191) //Classe B
  15.         cout<<"Adresse de Classe B"<<endl;
  16.     if(a>=192 && a<=223) //Classe C
  17.         cout<<"Adresse de Classe C"<<endl;
  18.     if(a>=224 && a<=239) //Classe D
  19.         cout<<"Adresse de Classe D"<<endl;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top