You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
307 B
C++
14 lines
307 B
C++
5 years ago
|
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;
|
||
|
|
||
|
}
|