home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / tybc4 / out4.cpp < prev    next >
C/C++ Source or Header  |  1993-03-24  |  291b  |  14 lines

  1. // C++ program which displays octal and hexadecimal integers
  2.  
  3. #include <iostream.h>
  4. #include <stdio.h>
  5.  
  6. main()
  7. {          
  8.   long i;
  9.   cout << "Enter an integer : ";
  10.   cin >> i;
  11.                               
  12.   printf("%ld = %lX (hex) = %lo (octal)\n", i, i, i);  
  13.   return 0;
  14. }