#include <iomanip>
#include <iostream>
#include <string>
void right_align( const std:: string & content, unsigned field_width) {
std:: cout << std:: quoted ( content) << " right aligned in a field of size " << field_width << '\n ' ;
std:: cout << "|" << std:: right << std:: setw ( field_width) << content << "|\n \n " ;
}
void left_align( const std:: string & content, unsigned field_width) {
std:: cout << std:: quoted ( content) << " left aligned in a field of size " << field_width << '\n ' ;
std:: cout << "|" << std:: left << std:: setw ( field_width) << content << "|\n \n " ;
}
int main( ) {
right_align( "*" , 20 ) ;
left_align( "*" , 20 ) ;
std:: cout << '\n ' ;
right_align( "*****" , 1 ) ;
left_align( "*****" , 1 ) ;
}
I2luY2x1ZGUgPGlvbWFuaXA+CiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPHN0cmluZz4KCnZvaWQgcmlnaHRfYWxpZ24oY29uc3Qgc3RkOjpzdHJpbmcmIGNvbnRlbnQsIHVuc2lnbmVkIGZpZWxkX3dpZHRoKSB7CiAgICBzdGQ6OmNvdXQgPDwgc3RkOjpxdW90ZWQoY29udGVudCkgPDwgIiByaWdodCBhbGlnbmVkIGluIGEgZmllbGQgb2Ygc2l6ZSAiIDw8IGZpZWxkX3dpZHRoIDw8ICdcbic7CiAgICBzdGQ6OmNvdXQgPDwgInwiIDw8IHN0ZDo6cmlnaHQgPDwgc3RkOjpzZXR3KGZpZWxkX3dpZHRoKSA8PCBjb250ZW50IDw8ICJ8XG5cbiI7Cn0KCnZvaWQgbGVmdF9hbGlnbihjb25zdCBzdGQ6OnN0cmluZyYgY29udGVudCwgdW5zaWduZWQgZmllbGRfd2lkdGgpIHsKICAgIHN0ZDo6Y291dCA8PCBzdGQ6OnF1b3RlZChjb250ZW50KSA8PCAiIGxlZnQgYWxpZ25lZCBpbiBhIGZpZWxkIG9mIHNpemUgIiA8PCBmaWVsZF93aWR0aCA8PCAnXG4nOwogICAgc3RkOjpjb3V0IDw8ICJ8IiA8PCBzdGQ6OmxlZnQgPDwgc3RkOjpzZXR3KGZpZWxkX3dpZ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