Tech Me All

Tips ,Tricks notes and Quizes

Category: C-Language

USE OF MANIPULATORS IN C++

USE OF MANIPULATORS #include<iostream.h> #include<conio.h> #include<iomanip.h> void main() { cout<<setw(7); cout<<setfill(‘#’); cout<<endl<<178; cout<<setw(4); cout<<endl<<21; cout<<setw(12); cout<<endl<<1234<<32<<452; cout<<setprecision(2); cout<<endl<<123.235; cout<<endl<<345.5056; getch(); } Output:   Discretion: The function setw() is a set width used to set the lenth of number , setfill() is set the character to fill in blank spaces in the value and endl is […]

Tech Me All © 2016 Frontier Theme