Skip to content

Program to show Base of Number using dec, oct and hexadecimal Manipulator Function

Program to show Base of Number using dec, oct and hexadecimal Manipulator Function

Code:

/*Program to show Base of Number using dec, oct and hexadecimal Manipulator Function*/
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
void main(void)
{
int value;
clrscr();
cout<<“nEnter the Value n”;
cin>>value;
cout<<“Decimal value is “<<dec<<value<<endl;
cout<<“Hexadecimal value is “<<hex<<value<<endl;
cout<<“Octal value is “<<oct<<value<<endl;
getch();
}

Sample Output:

Comment bellow for your Query and Feedback

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!