Click here to Skip to main content
15,899,825 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Four fours Pin
jmaida13-Oct-21 11:19
jmaida13-Oct-21 11:19 
GeneralRe: Four fours Pin
Amarnath S13-Oct-21 14:41
professionalAmarnath S13-Oct-21 14:41 
GeneralRe: Four fours Pin
jmaida13-Oct-21 15:05
jmaida13-Oct-21 15:05 
GeneralRe: Four fours Pin
mdblack9814-Oct-21 3:42
mdblack9814-Oct-21 3:42 
GeneralRe: Four fours Pin
Amarnath S14-Oct-21 4:06
professionalAmarnath S14-Oct-21 4:06 
GeneralRe: Four fours Pin
Harald M.19-Oct-21 23:34
Harald M.19-Oct-21 23:34 
GeneralRe: Four fours Pin
mdblack9820-Oct-21 2:46
mdblack9820-Oct-21 2:46 
GeneralRe: Four fours Pin
Harald M.20-Oct-21 3:51
Harald M.20-Oct-21 3:51 
The output, after repairing a small bug - condition in 2nd loop is i != modulus || j > 0:

1=(5/5)
2=(5/5)+(5/5)
3=(5/5)+(5/5)+(5/5)
4=(5/5)+(5/5)+(5/5)+(5/5)
5=5
6=5+(5/5)
etc.

None of these lines has five fives, so this does not solve the problem. Running it with modulus 4, one gets:

1=(4/4)
2=(4/4)+(4/4)
3=(4/4)+(4/4)+(4/4)
4=4
5=4+(4/4)
etc
Here, only the solution for 2 has four fours, all others are not solutions (two fours, six fours, one four, three fours, ...). So how does this "work for four fours"?
GeneralRe: Four fours Pin
mdblack9820-Oct-21 4:03
mdblack9820-Oct-21 4:03 
GeneralRe: Four fours Pin
Harald M.20-Oct-21 4:12
Harald M.20-Oct-21 4:12 
GeneralSelectively block USB devices from connecting to PCs Pin
Toto110713-Oct-21 1:59
professionalToto110713-Oct-21 1:59 
GeneralRe: Selectively block USB devices from connecting to PCs Pin
Richard MacCutchan13-Oct-21 5:31
mveRichard MacCutchan13-Oct-21 5:31 
GeneralRe: Selectively block USB devices from connecting to PCs Pin
Dan Neely13-Oct-21 11:00
Dan Neely13-Oct-21 11:00 
GeneralRe: Selectively block USB devices from connecting to PCs Pin
glennPattonWork313-Oct-21 8:28
professionalglennPattonWork313-Oct-21 8:28 
GeneralRe: Selectively block USB devices from connecting to PCs Pin
Dan Neely13-Oct-21 11:04
Dan Neely13-Oct-21 11:04 
GeneralRe: Selectively block USB devices from connecting to PCs Pin
englebart14-Oct-21 2:00
professionalenglebart14-Oct-21 2:00 
GeneralRe: Selectively block USB devices from connecting to PCs Pin
Stuart Dootson14-Oct-21 5:00
professionalStuart Dootson14-Oct-21 5:00 
GeneralCCC 2021-10-13 Pin
NeverJustHere12-Oct-21 22:14
NeverJustHere12-Oct-21 22:14 
GeneralRe: CCC 2021-10-13 Pin
OriginalGriff12-Oct-21 22:26
mveOriginalGriff12-Oct-21 22:26 
GeneralRe: CCC 2021-10-13 Pin
NeverJustHere12-Oct-21 22:27
NeverJustHere12-Oct-21 22:27 
GeneralRe: CCC 2021-10-13 Pin
OriginalGriff12-Oct-21 22:30
mveOriginalGriff12-Oct-21 22:30 
GeneralRe: CCC 2021-10-13 Pin
Peter_in_278012-Oct-21 23:04
professionalPeter_in_278012-Oct-21 23:04 
GeneralRe: CCC 2021-10-13 Pin
pkfox12-Oct-21 23:09
professionalpkfox12-Oct-21 23:09 
GeneralWindows 11: Another Microsoft misfire - yuck! Pin
Cp-Coder12-Oct-21 11:01
Cp-Coder12-Oct-21 11:01 
GeneralRe: Windows 11: Another Microsoft misfire - yuck! Pin
Super Lloyd12-Oct-21 13:34
Super Lloyd12-Oct-21 13:34 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   477 votes