Thursday, 24 January 2013

program 2-7(52) Demonstrate numeric manipulator

// this program demonstrate the numeric use of manipulates..
#include <iostream>
#include <iomanip>
#include <limits>
using namespace std;

int main()

{
    int x;
    cout << "enter your number \n";
    cin >> x;

cout << "value in decimal \t |" << dec << x << "\n";

cout << "value in octale \t |" << oct << x << "\n";

cout << "value in hexadecimal \t |" << hex << x << "\n";



    cin.ignore(numeric_limits<streamsize>::max(),'\n');
    cin.get();
    return 0;
}

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Enterprise Project Management