Question: There is a file attached that contains multiple lines. On each alternating line you will find a double and then a boolean. Your task: Sum

There is a file attached that contains multiple lines. On each alternating line you will find a double and then a boolean.

Your task: Sum all doubles that are followed by a true value, and ignore all values that are followed by a false value.

the file is called "Problem13"

The text file has this inside of it:

0.35057989617641006 false 0.4011745518570221 true 0.8704329175145333 false 0.5005129666820816 false 0.7180188199150055 true 0.49528176330332896 true 0.619406521897445 false 0.12286890045943932 false 0.9600368538079368 true 0.6225288689441805 true 0.4915916606255619 true 0.3599636189832842 false 0.7679810581020672 true 0.14545305067452552 true

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Id be happy to help you with that The task is to sum all the doubles that are f... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!