Guest User

Untitled

a guest
Jan 17th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  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";
Add Comment
Please, Sign In to add comment