Looking for reliable answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Get quick and reliable solutions to your questions from a community of experienced professionals on our platform. Join our platform to connect with experts ready to provide precise answers to your questions in different areas.
Sagot :
Answer:
Explanation:
#include <iostream>
using std::cout;
using std::endl;
using std::cin;
int main()
{
int side, rowPosition, size;
cout << "Enter the square side: ";
cin >> side;
size = side;
while ( side > 0 ) {
rowPosition = size;
while ( rowPosition > 0 ) {
if ( size == side || side == 1 || rowPosition == 1 ||
rowPosition == size )
cout << '*';
else
cout << ' ';
--rowPosition;
}
cout << '\n';
--side;
}
cout << endl;
return 0;
}
Thank you for choosing our platform. We're dedicated to providing the best answers for all your questions. Visit us again. We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. We're glad you visited Westonci.ca. Return anytime for updated answers from our knowledgeable team.