Sip Posted January 22, 2003 Report Share Posted January 22, 2003 quote:Originally posted by Hyestyle:... give me one way so that might be easier for me as an example.Here's one of them. I changed the space before 'n' to '-'. code:int i, n=20;for(i = 0; i <-n; i --) printf("-");Hint: the second one should also be fairly easiy since it's similar to this one. But the third one is tough I think. Not too many people would be able to do it on their own. quote:Originally posted by Hyestyle:How old are you Seaphan?1A Quote Link to comment Share on other sites More sharing options...
Hyestyle Posted January 22, 2003 Report Share Posted January 22, 2003 Seaphan how old are you? i see 1A ok im doing the rest of the code if i can Quote Link to comment Share on other sites More sharing options...
Hyestyle Posted January 22, 2003 Report Share Posted January 22, 2003 Seaphan your code does not work man. Review it.I run with my compiler it does not work try it again. Quote Link to comment Share on other sites More sharing options...
Sip Posted January 22, 2003 Report Share Posted January 22, 2003 quote:Originally posted by Hyestyle:Seaphan your code does not work man. Review it.I run with my compiler it does not work try it again.Very good. I just did that to see if you are paying attention or not. Here's the real 1-st solution: code:int i, n=20;for(i = 0;-i < n; i --) printf("-");change the space before 'i' to '-'. Quote Link to comment Share on other sites More sharing options...
Sip Posted January 22, 2003 Report Share Posted January 22, 2003 quote:Originally posted by Hyestyle:Seaphan how old are you? i see 1A... and the problem is? I thought you are a hacker dude! Quote Link to comment Share on other sites More sharing options...
Hyestyle Posted January 22, 2003 Report Share Posted January 22, 2003 Ok Sip I got question for you. First, how old are you? Second, Do you go to Armenian chat and what is your Screen Name? It would be better to talk on the chat cuz this forum is not enough for me lol Who says I am a hacker? Why do you think that you look at my site? LOL I just made something for fun. I like hacking but i aint good at it. Anyway hurry answer this. And what makes you say that I am a hacker? Quote Link to comment Share on other sites More sharing options...
Hyestyle Posted January 22, 2003 Report Share Posted January 22, 2003 Oh Seaphan I didn't understand why you said that i am hacker. 1A for this? LOOOOOL Demkes. Hacker inch kap uni dra het? you mean you're 14?LOL Quote Link to comment Share on other sites More sharing options...
Azat Posted January 22, 2003 Report Share Posted January 22, 2003 HyeStyle Welcome to HyeForum. if you need to know how old Seapanchik is you can go to Start->Run->Calc->view->Scientific->Hex->1A->Dec and the answer will be there. Good luck. [ January 21, 2003, 07:24 PM: Message edited by: Azat ] Quote Link to comment Share on other sites More sharing options...
Hyestyle Posted January 22, 2003 Report Share Posted January 22, 2003 Ok Sip. I did it another way. here it is: code: #include void main() { int i, n=20; for(i = 0; i < n; n --) printf("-"); }Vopshem we're done with this and the other onoe I don't care. Damn this was pain in the ass. Next, we'll talk about Qbasic Quote Link to comment Share on other sites More sharing options...
Harut Posted January 22, 2003 Report Share Posted January 22, 2003 Sip jan, es jahelnerits zguysh mna. Hyestyle, i'm 14. Sip is 1A. Quote Link to comment Share on other sites More sharing options...
Hyestyle Posted January 22, 2003 Report Share Posted January 22, 2003 Harut what you mean "Es Jahelnerits Zgush mna?" Et umes namikat anum ape jan? Quote Link to comment Share on other sites More sharing options...
Sip Posted January 22, 2003 Report Share Posted January 22, 2003 Ok, that's one way. There are 2 other ways to do it too (3 ways total). Qbasic? QuickBasic? Sure. We can talk about those too. I have to say out of all programming I have done, QuickBasic (4.5) was the most fun. I pretty much learned programming because of that, even though I started on Commodore 64 Basic and also GWBasic on an XT. But Qbasic and QuickBasic really were the first times when I got out of the "spaghetti programming" mode. Are you familiar with the term "spaghetti code"? Oh, and I'm sure Azat will be able to tell us more about how they used to program with rocks and branches in the old days before BASIC But talking about EVERYTHING computers? You trying to ruin my reputation as the somewhat computer savvy cool guy and expose me as the really really really geeky Sip? Quote Link to comment Share on other sites More sharing options...
Sip Posted January 22, 2003 Report Share Posted January 22, 2003 quote:Originally posted by Sip:Ok, that's one way. There are 2 other ways to do it too (3 ways total).Oooops ... actually, no. Sorry. You changed 2 characters there (-- to ++). You can only change 1 character. And there are 3 different ways to do it. Quote Link to comment Share on other sites More sharing options...
Harut Posted January 22, 2003 Report Share Posted January 22, 2003 watch out Sip! Hyestyle is trying to fool you. he changed two characters instead of one. Quote Link to comment Share on other sites More sharing options...
SKS Posted August 16, 2003 Report Share Posted August 16, 2003 SIP would this work for the C problem? #include int main(){ int i, n=-20; for (i=0; i < n; i--) printf("-");} or #include int main(){ int i, n = 20; for(i=19; i printf("-");} PS: I don't have a compiler right now so I am unsure of the result. Quote Link to comment Share on other sites More sharing options...
Sip Posted August 16, 2003 Report Share Posted August 16, 2003 Sorry ... neither will work. In the first one, i starts at 0 and n is -20. So the loop will never execute since i In the second one, i=19, n=20 and i-- ... that will print a LOT of '-'s because i will be less than n for a long time! Note that in the original problem, you can only change one character. You can't add characters, you can't remove characters, and you can only change one character into another character. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.