Programming Question
Moderators:Labib, bristy1588
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.
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
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
-
- 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.
- Phlembac Adib Hasan
- Posts:1016
- Joined:Tue Nov 22, 2011 7:49 pm
- Location:127.0.0.1
- Contact:
Re: Programming Question
One approach can be searching each element of the first array individually in the second array.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.
Welcome to BdMO Online Forum. Check out Forum Guides & Rules
-
- 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
Reason: Spelling and syntactical error correction
- Phlembac Adib Hasan
- Posts:1016
- Joined:Tue Nov 22, 2011 7:49 pm
- Location:127.0.0.1
- Contact:
Re: Programming Question
To write a desktop app, you need to use a framework. I would recommend Qt, a very popular framework. Visit its website: https://www.qt.io/
Welcome to BdMO Online Forum. Check out Forum Guides & Rules