By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,510 Members | 1,821 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,510 IT Pros & Developers. It's quick & easy.

how to program the square astrisk that the user is inputted

P: 1
#include <iostream>
using namespace std
int main ()

cout<<"please input the size of the square");
cin>>("%d";& size);

for(int i=0;i<size;i++)
for(int j=0;j<size;j++)
return 0;
Aug 16 '16 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 2,398
What is your question?
Aug 16 '16 #2

Expert Mod 5K+
P: 9,197
Your loops work just fine. BUT you have typos that stop the compile from working and the cin you use is coded like you were using scanf.

There are other missing parenthesis an
d no method to stop the program at the end so you can see your displayed square.

Try to get this to compile. If you can't post again and I will help you through it. I'd do this for you but I already know how so that doesn't help you.
Aug 16 '16 #3

Post your reply

Sign in to post your reply or Sign up for a free account.