rendered paste body#include <iostream>
#include <string>
#include <iomanip>
using namespace std ;
namespace
{
void Avocat ()
{
cout << "Qu'avez vous a dire ?" << endl ;
string Textelu ;
cin >> Textelu ;
char Lettre;
cout << "Je vois... Voila: " << endl;
for ( unsigned i = 0; i < Textelu.length (); ++i)
{
char Lettre = Textelu [i];
if ( Lettre == ' ') continue;
if ( Lettre <= 'P')
{
Lettre = Lettre + 11 ;
cout << Lettre ;
}
else
{
Lettre = Lettre - 16;
cout << Lettre ;
}
}
}
void Prevote ()
{
cout << "Qu'avez vous a dire ?" << endl ;
string Textelu ;
cin >> Textelu ;
char Lettre;
cout << "Je vois... Voila: " << endl;
for ( unsigned i = 0; i < Textelu.length (); ++i)
{
char Lettre = Textelu [i];
if ( Lettre == ' ') continue;
if ( Lettre <= 'V')
{
Lettre = Lettre + 5;
cout << Lettre ;
}
else
{
Lettre = Lettre - 22;
cout << Lettre ;
}
}
}
void Crypter ()
{
cout << "Qui etes vous ?"<< endl;
string Choix ;
cin >> Choix ;
if ( Choix == "Avocat" || Choix == "avocat")
{
Avocat ();
}
else if ( Choix == "Prevote" || Choix == "prevote")
{
Prevote ();
}
else
{
cout << "Et mon cul c'est de la morue ... Dégage !!!!";
}
cout << endl;
system ("PAUSE");
}
}
int main ()
{
Crypter();
return 0;
}