HEX:
Copy codeThe Code is as follows: # include <iostream. h>
# Include <iomanip. H>
Main (void)
{
Long n = 10000;
Cout Return 0;
}
OCT:
Copy codeThe Code is as follows: # include <iostream. h>
# Include <iomanip. H>
Main (void)
{
Long n = 10000;
Cout <oct <n;
Return 0;
}
DEC:
Copy codeThe Code is as follows: # include <iostream. h>
# Include <iomanip. H>
Main (void)
{
Long n = 10000;
Cout <dec <n <endl;
Return 0;
}
Copy codeThe Code is as follows: # include <iostream>
Using namespace std;
Int main ()
{
Cout. setf (ios: hex, ios: basefield );
Cout <100; // this displays 64
Return 0;
}
Copy codeThe Code is as follows: # include <iostream>
# Include <iomanip>
Using namespace std;
Int main ()
{
Int n;
Cout <"Enter a decimal number :";
Cin> n;
Cout <n <"in hexadecimal is :"
<Hex <n <'/N'
<Dec <n <"in octal is :"
<Oct <n <'/N'
<Setbase (10) <n <"in decimal is :"
<N <endl;
Return 0;
}