Docsity

Stream Manuplators - Introduction to Programming - Lecture Slides, Slides of Computer Programming

Partial preview of the text

Download Stream Manuplators - Introduction to Programming - Lecture Slides and more Slides Computer Programming in PDF only on Docsity!

Introduction to Programming

Lecture 36

#include <iostream.h> #include <fstream.h>

 cin.eof ( ) ;  cin.fail ( ) ;  cin.bad ( ) ;  cin.good ( ) ;  cin.clrear ( ) ;

Manipulators

float PI = 3.1415926 ;

cout << flush ;

Manipulator With Arguments

cout.flush ( ) ;

Number System  Binary  Decimal  Octal  Hexadecimal

#include <iostream.h>

#include <iomanip.h>

main ( )

int i = 10 ; Output

cout << oct << i << endl ; 12

cout << hex << i<< endl ; A

cout << dec << i << endl ; 10

Example

WS Manipulator