Showing posts with label manipulator. Show all posts
Showing posts with label manipulator. Show all posts

Saturday, 28 April 2012

Program Of Getline Manipulator In C++

#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
const int max=80;
char str[max];
cout<<"Enter String=";
cout<<"String is="<<str;
getch();
}

Friday, 27 April 2012

Program Of Set Fill Manipulator In C++

#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
cout.width(6);
cout<<204<<endl;
cout.width(5);
cout<<34;
getch();
}

Program Of Manipulator DEC,HEX,OCT In C++

#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int i;
cout<<"Enter hexadecimal number=";
cin>>hex>>i;
cout<<"\n Hexdecimal Value ="<<hex<<i<<endl;
cout<<"\n Octal Value ="<<oct<<i<<endl;
cout<<"\n Decimal Value ="<<dec<<i<<endl;
getch();
}