[user02@FC4 Lesson04]$ cat -n octhex.cpp
1 #include <iostream>
2 using namespace std;
3
4 int main()
5 {
6 cout << "Octal: " << oct << 10 << ' ' << 20 << endl;
7 cout << "Hexadecimal: " << hex << 10 << ' ' << 20 << endl;
8 cout << "Decimal: " << dec << 10 << ' ' << 20 << endl;
9
10 return 0;
11 }
[user02@FC4 Lesson04]$ g++ -o octhex octhex.cpp[user02@FC4 Lesson04]$ ./octhex
Octal: 12 24
Hexadecimal: a 14
Decimal: 10 20
lesson_4_octhex.cpp, Rev. 1, Last changed on 2005-08-08 04:16, 306 page hits