Reputation: 0 Apprentice
- New Members
- Active Posts:
- 14 (0.03 per day)
- 05-October 12
- Profile Views:
- Last Active:
- Oct 11 2012 10:16 AM
- Dream Kudos:
Posts I've Made
Posted 10 Oct 2012alright. thanks.
Posted 10 Oct 2012The op clearly doesn't understand the exercise or how to code it. You guys are basically doing this for him. That's why he didn't answer yes. He doesn't know.
Sir, I respect you replying to my post and all and I did mention I'm new to this so I think you need to spare me that constant nag. Ofcourse I don't know all this otherwise I wouldn't have asked for a barely 5,6 lines of code. You guys are pros so you know stuff in details while I'm here to learn. I didn't get to reply to Jim's post #22 because I saw Salem_c
s post later. I know what he was talking about though. Salem_c's code actually helped me and I tried learning whatever concept he has used. I have googled each concept to learn it so by the time i get judged on my level of programming skills I'll have enough knowledge on this and i don't have to worry about my instructor being totally daft.
Posted 10 Oct 2012Well guys ofcourse I did mention I am new to this so I'm trying to learn more and more stuff. From what I got from Salem_c's code was that he used "(perline+1)*lines" so that we can get all the asterisks at once e.g 15. Then he used "[i%(perline+1)==perline]" later to seperate 5 asterisks and get the remainder. I hope I'm correct on that?
Posted 9 Oct 2012Ah, but the printf() is not of the from printf("*") which you said is a hard requirement. It is of the form printf("%c", ...).
Was the asterisk a mind game (along the lines of "there 10 people in the world who understand binary") where it actually represented a wildcard rather than a literal asterisk? If it was a wildcard then my original printf("*****") should have also been valid, by induction: "*" is a wildcard, and so is "%c", so "*%c" would be legal, then so would "**", ...
Your argument is valid but printing one asterisk here as printf("*") replaced as %c once inside and that multiplied using arithmetical operators is fine. Either way I'm printing one asterisk and then multiplying the result to be displayed multiple times so that is not a problem. The main problem was in using only one printf which prints one asterisk and then using one loop. Anyways thanks all.
Posted 9 Oct 2012
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
aychdogg hasn't added any friends yet.