Created
March 26, 2015 03:48
-
-
Save huezoaa/950317353045212bdda8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var totalGen = 19; | |
var totalMW = 0; | |
var smallMW = 62; | |
var largeMW = 124; | |
var capacity = 0; | |
for (var genNum = 1; genNum <= totalGen; genNum++){ | |
if (genNum <= 4){ | |
capacity = smallMW; | |
}else{ | |
capacity = largeMW; | |
}; | |
if (genNum%2 === 0){ | |
totalMW += capacity; | |
console.log("Generator #" + genNum +" is on, adding " + capacity + " MW, for a total of " + totalMW + " MW!"); | |
}else{ | |
console.log("Generator #" + genNum + " is off."); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment