Can I give space in within setfill command? I wanted to write like this with space * * * *
But not like this **** without space.
Here is my code.
1 2 3 4 5 6 7 8 9 10 11 12 13
|
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout << setfill('*') << setw(34);
cout << "\n";
// System Commands
cout << endl << endl << endl;
system("pause");
}
|
Last edited on
But according to assignment, I have to write it with manipulator functions.
I have to write this with manipulator function.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Programming Assignment 1 *
* Computer Programming I *
* Author: ??? *
* Due Date: Thursday, Jan. 24 *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Last asterisk are aligned just like the first asterisks but this website changed the position of last asterisks
Ok my bad, there was no space between asterisks.
But how to write this assignment with manipulator functions?
Last edited on
Yes like yours one.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Programming Assignment 1 *
* Computer Programming I *
* Author: ??? *
* Due Date: Thursday, Jan. 24 *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
Asterisk problem is still there even after using output tag.
Thanks.
Last edited on