1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| # include<iostream>
using namespace std;
# include <iomanip>
int main ()
{
for(char capital = 'A', smal = 'a'; capital<= 'Z';capital ++ ,smal ++)
cout<<endl
<<"\t"<<capital //affiche capital sous forme de caractère
<< hex<<setw(10) <<static_cast<int>(capital) //affiche capitale sous forme hexadécimale
<< dec<<setw(10) <<static_cast<int>(capital) //affiche capitale sous forme décimale
<<" "<<smal //affiche smal sous forme de caractère
<<hex<<setw(10)<<static_cast<int> (smal) //affiche smal sous forme hexdecimale
<<dec<<setw(10)<<static_cast<int> (smal); // affiche smal sous forme decimale
cout<<endl;
cin.ignore ();
return 0;
} |
Partager