/***************************************************************************** * fun1.c * Matthew Chartier * CS50/CSCI E-52 * * Takes an int from the user and then squares(?) it using a function. * Why is this program broken? *****************************************************************************/ #include #include // Something is WRONG here.... void square(int y) { return y * y; } int main (int argc, char* argv[]) { //Get a positive integer from the user and store it in x. int x = GetInt(); //Use a function to square the value in x! But wait..., did that work? square(x); //Print out our new (squared? unfortunately not...) value. printf("Your number squared is: %d\n", x); return 0; }