C++ program to implement output manipulation using sets & setfill

C++ program to implement setw & setfill

Write a simple C++ program that prints ten fourfour with a width of 10 in between the ten and fourfour.
Follow that up with a padding of 80 dashes.
• You cannot manually/hardcode 80 dashes literally

• You must use manipulators to create this consecutive dash pattern

Output:

page1image6150864
#include <iostream>
#include <iomanip>
using namespace std;

int main() {
cout << “ten” << setw(10) << “” << “fourfour” << endl; //prints ten fourfour with a width of 10 in between
cout << setfill(‘-‘) << setw(80) << “” << endl; //prints 80 dashes
return 0;
}