[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 196 KB, 1024x768, Cologne_Cathedral_And_Hohenzollern_Bridge_Cologne_Germany.jpg [View same] [iqdb] [saucenao] [google]
6114299 No.6114299[DELETED]  [Reply] [Original]

Alright /sci/ I am writing a java program that shows Goldbach's conjecture
i.e
the program is supposed to say
"Please enter an even number greater than 2"
10
10 = 7+3
Started yesterday, tried multiple multiple things,
any advice or suggestions on how to start or do this?

>> No.6114304

bump :/

>> No.6114306

Here's babies first idiot's way to do it.

1. Take in number = x
2. Generate Primes < x
3. is_in_list_of_primes(x - Prime(1))
4. repeat 3

>> No.6114324

>>6114306
>Anonymous 10/25/13(Fri)18:24 UTC-5 No.6114306
>Here's babies first idiot's way to do it.
>1. Take in number = x
>2. Generate Primes < x
>3. is_in_list_of_primes(x - Prime(1))
>4. repeat 3
alright

>> No.6114347
File: 210 KB, 1024x768, Jshit.jpg [View same] [iqdb] [saucenao] [google]
6114347

>>6114299
>java

reported

>> No.6114367

>>6114347
but every CS course sequence begins with java D :

>> No.6114381

>>6114367
>CS course

>>/g/ is that way

EE/CompE/Math/Physics programing courses begin with C++

>> No.6114385

>>6114381
depends where you go,
here we are required to do an into to computer science class before the higher level physics or engineering classes

>> No.6114424

>>6114385
The you should have substituted in the Engineering department's course instead.

>> No.6114555

>>6114367
I once read an article saying how teaching Java first is bad
can't find it right now