Click here to Skip to main content
15,889,867 members
Home / Discussions / Algorithms
   

Algorithms

 
Questioncomipler construction Pin
rizwana rashid7-Sep-09 8:23
rizwana rashid7-Sep-09 8:23 
AnswerRe: comipler construction Pin
Christian Graus7-Sep-09 15:55
protectorChristian Graus7-Sep-09 15:55 
AnswerRe: comipler construction Pin
mabo428-Sep-09 1:36
mabo428-Sep-09 1:36 
AnswerRe: comipler construction Pin
Luc Pattyn8-Sep-09 2:32
sitebuilderLuc Pattyn8-Sep-09 2:32 
GeneralRe: comipler construction Pin
molesworth10-Sep-09 7:27
molesworth10-Sep-09 7:27 
AnswerRe: comipler construction Pin
PIEBALDconsult24-Sep-09 17:44
mvePIEBALDconsult24-Sep-09 17:44 
AnswerRe: Help need,Spanning Tree Pin
Moreno Airoldi8-Sep-09 9:18
Moreno Airoldi8-Sep-09 9:18 
Questionhelp needed for loops Pin
aihcezs1444-Sep-09 0:11
aihcezs1444-Sep-09 0:11 
The question goes as follow.

1. Write a c++ program that finds and prints all the prime numbers less than 100. (Hint:For each number from 2 to 100, find reaminder = number%n, where n ranges from 2 to sqrt(number). If any remainder equals 0, the number is not a prime number.)

2. Write a c++ program that calculates the nth number in the Fibonacci sequence, where the user enters n into the program interactively. For example, if n=6, the program should display a value of 5.The Fibonacci sequence is 0, 1, 1, 2, 3, 5, 8, 13...; the first two terms are 0 and 1, and each term thereafter is the sum of the two preceding terms-that is, fib(n)=fib(n-1)+fib(n-2).


I have tried to run but my program would not work. Cry | :(( would anyone please help me out with this. thank you. Smile | :)
AnswerRe: help needed for loops Pin
Richard MacCutchan4-Sep-09 0:18
mveRichard MacCutchan4-Sep-09 0:18 
GeneralRe: help needed for loops Pin
aihcezs1444-Sep-09 0:37
aihcezs1444-Sep-09 0:37 
GeneralRe: help needed for loops Pin
Richard MacCutchan4-Sep-09 0:50
mveRichard MacCutchan4-Sep-09 0:50 
GeneralRe: help needed for loops Pin
aihcezs1444-Sep-09 1:00
aihcezs1444-Sep-09 1:00 
GeneralRe: help needed for loops Pin
Luc Pattyn4-Sep-09 1:09
sitebuilderLuc Pattyn4-Sep-09 1:09 
GeneralRe: help needed for loops [modified] Pin
aihcezs1444-Sep-09 2:13
aihcezs1444-Sep-09 2:13 
GeneralRe: help needed for loops Pin
Luc Pattyn4-Sep-09 2:45
sitebuilderLuc Pattyn4-Sep-09 2:45 
GeneralRe: help needed for loops Pin
harold aptroot4-Sep-09 3:23
harold aptroot4-Sep-09 3:23 
QuestionRandom functions family Pin
Quake2Player30-Aug-09 14:31
Quake2Player30-Aug-09 14:31 
AnswerRe: Random functions family Pin
Nuri Ismail31-Aug-09 4:10
Nuri Ismail31-Aug-09 4:10 
QuestionI need help decrypting an encrypted text (I also got cleartext examples) Pin
SimpleData30-Aug-09 2:43
SimpleData30-Aug-09 2:43 
JokeRe: I need help decrypting an encrypted text (I also got cleartext examples) Pin
annathor30-Aug-09 23:23
annathor30-Aug-09 23:23 
GeneralRe: I need help decrypting an encrypted text (I also got cleartext examples) Pin
SimpleData30-Aug-09 23:24
SimpleData30-Aug-09 23:24 
GeneralRe: I need help decrypting an encrypted text (I also got cleartext examples) Pin
Richard MacCutchan31-Aug-09 7:29
mveRichard MacCutchan31-Aug-09 7:29 
GeneralRe: I need help decrypting an encrypted text (I also got cleartext examples) Pin
SimpleData31-Aug-09 8:03
SimpleData31-Aug-09 8:03 
GeneralRe: I need help decrypting an encrypted text (I also got cleartext examples) Pin
Richard MacCutchan31-Aug-09 9:21
mveRichard MacCutchan31-Aug-09 9:21 
GeneralRe: I need help decrypting an encrypted text (I also got cleartext examples) Pin
SimpleData31-Aug-09 9:31
SimpleData31-Aug-09 9:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.