Skip to content

Instantly share code, notes, and snippets.

@matschaffer
Created March 1, 2013 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matschaffer/5067170 to your computer and use it in GitHub Desktop.
Save matschaffer/5067170 to your computer and use it in GitHub Desktop.
// Make a sum and count variable
for (/* i from 0 to 2 */) {
// read user input
// add to sum
// increment count
}
//print sum and sum / count
//reset sum and count
//get user input
while (/* user input isn't -999 */) {
// add to sum
// increment count
// get user input
}
//print sum and sum / count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment