#include <iostream>
#include <iomanip>
int main()
{
for(int i = 0; i < 300; i += 11)
{
std::cout << std::setfill ( ' ' ) << std::setw (2) << (i % 100) << std::endl;
}
return 0;
}
/*
Note:
- for std::setfill ( ' ' ):
- item in '' is what will be used for filling
- std::cout may be replaced with a std::stringstream if you need it
- modulus is used to cut the integer to an appropriate length, for strings use substring
- std::setw is used to define the length of the needed string
*/