At least you didn’t use the magic word “urgent”. And please note: that link includes another link about subject lines.
You have some code which works, but as you have said yourself, there is repeated code. You have already worked out how to write one row of asterisks. Now all you have to do is work out how to print that row repeatedly.