programming-examples/c++/Others/Octal - Hexadecimal - Decimal conversion.cpp

14 lines
307 B
C++
Raw Normal View History

2019-11-15 12:59:38 +01:00
Octal - Hexadecimal - Decimal conversion
#include <iostream.h>
#include <iomanip.h>
int main()
{
cout<<"The decimal value of 15 is "<<15<<endl;
cout<<"The octal value of 15 is "<<setiosflags(ios::oct)<<15<<endl;
cout<<"The hex value of 15 is "<<setiosflags(ios::hex)<<15<<endl;
return 0;
}