setw in c++ code example
Example 1: setw in c++
setw(int n)
Example 2: set in c++
#include
#include
#include
#include
#include
using namespace std;
//set mentains internally the ascending order of these numbers
void setDemo()
{
set S;
S.insert(1);
S.insert(2);
S.insert(-1);
S.insert(-10);
S.erase(1);//to remove an element
//Print all the values of the set in ascending order
for(int x:S){
cout<