## Programming Question

Discuss Computer Science and Programming related problems

Moderators: bristy1588, Labib

Shifat
Posts: 53
Joined: Sun Jul 31, 2011 12:21 pm

### Programming Question

I have a question to ask.... According to the conjecture of Goldbach we can write an even number (>2)..as the sum of two primes, example-8=5+3,90=83+7 etc...... Now I want to write a program using Qbasic (i am novice since).. where I will input an even number greater than 2, and the output will be two primes... I am having a bit problem to make the algorithm,and the sudocode so please help.
Last edited by Shifat on Mon Aug 22, 2011 8:50 pm, edited 2 times in total.

Shifat
Posts: 53
Joined: Sun Jul 31, 2011 12:21 pm

### Re: Programming Question

Well I submit a way here, please check if it is programmable,
1.Input A
2.P=3
3. Compare- If (A-P) is a prime then N=A-P
print N,P. Goto 6
else go to next step
4. find the next prime form P to A
let the prime is Q
5. P=Q and goto 3
6.end

amlansaha
Posts: 100
Joined: Tue Feb 08, 2011 1:11 pm
Contact:

### Re: Programming Question

i think your alogarithm is correct
অম্লান সাহা

shayanjameel08
Posts: 10
Joined: Mon Nov 04, 2013 6:17 pm

### Re: Programming Question

My question is ..Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find which number is not present in the second array.

Posts: 1012
Joined: Tue Nov 22, 2011 7:49 pm
Location: 127.0.0.1
Contact:

### Re: Programming Question

shayanjameel08 wrote:My question is ..Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find which number is not present in the second array.
One approach can be searching each element of the first array individually in the second array.
Welcome to BdMO Online Forum. Check out Forum Guides & Rules: http://forum.matholympiad.org.bd/viewtopic.php?f=25&t=6

Mehedi Mhc
Posts: 1
Joined: Fri Oct 21, 2016 8:33 am

### Re: Programming Question

I want to make a desktop app in C or C++. How can I do so? I shall wait for the answer.
Last edited by Phlembac Adib Hasan on Mon Nov 07, 2016 12:17 pm, edited 1 time in total.
Reason: Spelling and syntactical error correction