Question: How do I modify this to print birth year in decamil, hexadecimal, and octal form. Label each value. Line up output in columns using the

How do I modify this to print birth year in decamil, hexadecimal, and octal form. Label each value. Line up output in columns using the tab character. And print your age using c++

#include using namespace std; //------------------------------------------------------------------------------  int main() { cout << 1234 << "\t(decimal) " << hex << 1234 << "\t(hexadecimal) " << oct << 1234 << "\t(octal) "; cout << 1234 << '\t' << hex << 1234 << '\t' << oct << 1234 << ' '; cout << 1234 << ' '; // the octal base is still in effect  cout << 1234 << '\t' << hex << 1234 << '\t' << oct << 1234 << ' '; cout << showbase << dec; // show bases  cout << 1234 << '\t' << hex << 1234 << '\t' << oct << 1234 << ' '; cout << 1234 << '\t' << 0x4d2 << '\t' << 02322 << ' '; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!