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

While compiling this code i got

P: 1
#include<stdio.h>
#include<conio.h>
{
void main()
int i,j;
scanf("%d",&j);
for(i=0;i<=j;i++)
printf("*");
for(i=j;i<=0;i--)
printf("*");

}
Aug 1 '17 #1

✓ answered by weaknessforcats

The { goes underneath void main() rather than on top of it.

Share this Question
Share on Google+
1 Reply


weaknessforcats
Expert Mod 5K+
P: 9,197
The { goes underneath void main() rather than on top of it.
Aug 1 '17 #2

Post your reply

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