[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Anyone here good at coding in jbasic? Newfag coder here who could

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 3

File: BxDN74uCMAAnTor.jpg (79KB, 576x1024px) Image search: [Google]
BxDN74uCMAAnTor.jpg
79KB, 576x1024px
Anyone here good at coding in jbasic? Newfag coder here who could use some help making a program that will count between 1 and 2000 randomly with two different counters until both of them are at the same number at the same time. Thanks in advance
>Pic unrelated
>>
And what shall happen if they never match?
>>
>>224161
it would just keep going until it finds one
>>
>>224161
I've seen them run and It usually doesn't take very long at all.
>>
also,
>dubs
>>
>>224176
Ahh now I see what you mean.
>>
File: randomnumberprogram.png (37KB, 874x648px) Image search: [Google]
randomnumberprogram.png
37KB, 874x648px
>>224158
Hey buddy I created a replica of the program you want to create. However I wrote it in C++. Maybe looking at my code could help you create yours? Concepts could be similar anyway.. here you are.
>>
>>224269
This code would be much more elegantly written if you stripped out the stop var and simply did

while (counter1 != counter2)
>>
>>224269
I'm pretty sure OP wants to (randomly) increment one counter or the other, then halt when a=b or a>2000 or b>2000

Also
>2016
>let's learn C++
At least use Swift, Rust or D.
>>
>>224278
Or, used break instead of while(i_dont_know_what_break_does)
>>
>>224301
>Swift, Rust or D
>Hurr Durr C++ is to mainstream therefore I program some exotic phantasy language.
Let's see how many job ads are looking for C++ skills and how many are looking for Rust skills
>>
>>224305
I'ma guess "none", and "some".

Unless you're planning on writing the next Flash Player, C++ is old and busted. As a tool for teaching basic programming concepts in a thread like this, I'm not sure I could actually think of a worse language.
>>
>>224307
This example just used a while loop and an if statement. In every serious programming language the solution would look almost the same. I don't see why C++ should be less suitable for this example than any other language.
>>
File: dubs.jpg (72KB, 462x462px) Image search: [Google]
dubs.jpg
72KB, 462x462px
>>224177

noice
Thread posts: 14
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.