C++ Programming

C++ Implement Setw Manipulator in OOP

Program to implement setw manipulator in OOP

How to implement setw in c++ programming. 

Implement setw manipulator in object-oriented programming.

UNIVERSITY                    LOCATION                   

TU                     KATHMANDU
KU                     DULIKHEL

C++ Code

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
cout<<setw(10)<<"UNIVERSITY"<<setw(19)<<"LOCATION"<<endl;
cout<<setw(10)<<"TU"<<setw(17)<<"BALKHU"<<endl;
cout<<setw(10)<<"KU"<<setw(20)<<"DHULIKHEL"<<endl;

cout<<endl<<"Thank you"<<endl;
cout<<endl<<"Press any key to continue...";
getch();
}

Tuts

About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

program to find leap year
C++ Programming

C++ Program to Find Leap Year by Using Function

  • March 3, 2016
Write a program to find if the inputted year is a leap year or not by using the concept of