Tuesday, 3 February 2015

SETW(5) FUNCTION IN C++

Structure of the Problem Requirements

The Setw(5) exists in iomanip library and used to set the field width. Setw(5) set the number of characters to be used as the field width for the next insertion operation. In this problem we make the table of our website pages with setw(5) function.

Source Code

#include<iostream>
#include<iomanip>
using namespace std;
int main ()
{
cout<<setw(45)<<"LEP Tutorials \n \n \n ";
cout<<setw(5)<<"HOME"<<setw(10)<<"C++"<<setw(10)<<"JAVA"<<endl;
cout<<setw(6)<<"HTML"<<setw(10)<<"CSS"<<setw(9)<<"PHP"<<endl;
cout<<setw(9)<<"ANDROID"<<setw(9)<<"LINUX"<<setw(7)<<"SEO"<<endl;
}

Output of the Program

SETW(5) FUNCTION IN C++

Share it Please
asad

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.

0 comments:

Post a Comment