Skip to content

Instantly share code, notes, and snippets.

@sojohnnysaid
Created February 11, 2018 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sojohnnysaid/6163e505f0d5526d7e997fda92f57a22 to your computer and use it in GitHub Desktop.
Save sojohnnysaid/6163e505f0d5526d7e997fda92f57a22 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int multiply(int);
int main(void)
{
// Try using a debugger to figure out what is going wrong
for(int i = 900; i < 905; i++)
{
int mynumber = multiply(i);
if (mynumber > 0)
printf("You won %d bonus points!\n", mynumber);
else
printf("Something went wrong! Try again later!\n");
}
}
int multiply(int num)
{
int result = num * 2376000;
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment