daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Jan 17th, 2018 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main() {
  2.  
  3.     cout << "DECIMAL            BINARY      HEXDECIMAL              BCD" << endl;
  4.  
  5.     for (int num = 0; num <= 255; num++) {
  6.         cout << num << "            ";
  7.         cout << binary(num) << "    ";
  8.         cout << hex(num) << "               ";
  9.         cout << bcd(num);
  10.         cout << endl;
  11.     }
  12.  
  13.     return 0;
  14. }
  15.    
  16. ofstream outputFile("program0.txt");
  17. //... An example of how to write to a txt file
  18. outputFile << "writing to file";
RAW Paste Data
Top