lesson 4 octhex cpp
[[lesson_4_octhex_cpp]] last edit on Aug 8, 2005 4:16 AM by rescued_by_c

[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