Click here to Skip to main content
16,016,807 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Blum Blum Shub Pin
Richard MacCutchan5-Oct-20 9:02
mveRichard MacCutchan5-Oct-20 9:02 
GeneralRe: Blum Blum Shub Pin
Member 149564755-Oct-20 9:08
Member 149564755-Oct-20 9:08 
GeneralRe: Blum Blum Shub Pin
Richard MacCutchan5-Oct-20 9:23
mveRichard MacCutchan5-Oct-20 9:23 
AnswerRe: Blum Blum Shub Pin
ZurdoDev5-Oct-20 10:15
professionalZurdoDev5-Oct-20 10:15 
AnswerRe: Blum Blum Shub Pin
David Crow6-Oct-20 2:39
David Crow6-Oct-20 2:39 
GeneralRe: Blum Blum Shub Pin
Member 149564756-Oct-20 10:32
Member 149564756-Oct-20 10:32 
GeneralRe: Blum Blum Shub Pin
Richard Andrew x646-Oct-20 10:45
professionalRichard Andrew x646-Oct-20 10:45 
SuggestionRe: Blum Blum Shub Pin
David Crow6-Oct-20 16:05
David Crow6-Oct-20 16:05 
Member 14956475 wrote:
...i need to add from console the biggest number D and i dont know how to put it in as now it's generating numbers without upper limit .
Change your main() signature to:
void main( int argc, char *argv[] )
Then access argv[1] to get D as a command line argument.

Also, your two for() loops are accessing beyond the end of the x array. In C, arrays start at 0.

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles


GeneralRe: Blum Blum Shub Pin
Member 149564757-Oct-20 7:13
Member 149564757-Oct-20 7:13 
AnswerRe: Blum Blum Shub Pin
David Crow7-Oct-20 7:31
David Crow7-Oct-20 7:31 
GeneralRe: Blum Blum Shub Pin
Member 149564757-Oct-20 7:39
Member 149564757-Oct-20 7:39 
GeneralRe: Blum Blum Shub Pin
David Crow7-Oct-20 7:55
David Crow7-Oct-20 7:55 
AnswerRe: Blum Blum Shub Pin
Member 149564758-Oct-20 1:36
Member 149564758-Oct-20 1:36 
GeneralRe: Blum Blum Shub Pin
Richard MacCutchan8-Oct-20 2:27
mveRichard MacCutchan8-Oct-20 2:27 
QuestionWritePrinter Fails to Print on Inkjet Printer Pin
sandford_j29-Sep-20 6:52
professionalsandford_j29-Sep-20 6:52 
QuestionRe: WritePrinter Fails to Print on Inkjet Printer Pin
David Crow29-Sep-20 16:44
David Crow29-Sep-20 16:44 
AnswerRe: WritePrinter Fails to Print on Inkjet Printer Pin
sandford_j29-Sep-20 22:16
professionalsandford_j29-Sep-20 22:16 
QuestionRe: WritePrinter Fails to Print on Inkjet Printer Pin
David Crow30-Sep-20 2:01
David Crow30-Sep-20 2:01 
AnswerRe: WritePrinter Fails to Print on Inkjet Printer Pin
sandford_j30-Sep-20 4:54
professionalsandford_j30-Sep-20 4:54 
AnswerRe: WritePrinter Fails to Print on Inkjet Printer Pin
Gerry Schmitz29-Sep-20 18:33
mveGerry Schmitz29-Sep-20 18:33 
GeneralRe: WritePrinter Fails to Print on Inkjet Printer Pin
sandford_j29-Sep-20 22:23
professionalsandford_j29-Sep-20 22:23 
AnswerRe: WritePrinter Fails to Print on Inkjet Printer Pin
mo149230-Sep-20 8:55
mo149230-Sep-20 8:55 
GeneralRe: WritePrinter Fails to Print on Inkjet Printer Pin
sandford_j30-Sep-20 12:05
professionalsandford_j30-Sep-20 12:05 
AnswerRe: WritePrinter Fails to Print on Inkjet Printer Pin
mo14921-Oct-20 1:18
mo14921-Oct-20 1:18 
GeneralRe: WritePrinter Fails to Print on Inkjet Printer Pin
sandford_j1-Oct-20 2:53
professionalsandford_j1-Oct-20 2:53 

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.