Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.9K Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Can somebody help me on building up my LOOP structure?

Posted 12 years ago

Can somebody help me on finalizing my loop structure? I am looking for a loop that will BREAK when I get an integer results and print that result

I tried that one but it does not work Can you improve it?

Do[If[IntegerQ[107/i],Print[107/i],{i,2,8,2}]

Thanks for your help

Louis

POSTED BY: Louis Piche
5 Replies
Posted 12 years ago
POSTED BY: Louis Piche
POSTED BY: David Reiss

You need a right bracket to close the If statement.

Do[If[IntegerQ[107/i], Print[107/i]], {i, 1, 8}]

107

POSTED BY: Frank Kampas
Posted 12 years ago
POSTED BY: Louis Piche
Posted 9 years ago
POSTED BY: Louis Piche
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard