Well I am trying to get the main program here to run the function getInt and then return the value and print it out. For some reason I enter the number and it quits the program and prints out some huge number before the command prompt. Can someone help?
/*
Patrick Lutz
c071100
Lab3
2-8-05
*/
#include
#include
int getInt();
main (void)
{
int myfunc;
myfunc=0;
myfunc=getInt();
printf("\n%d",&myfunc);
}
/*
Patrick Lutz
c071100
Lab3
2-8-05
*/
#include
#include
int getInt()
{
int number;
number=0;
printf("\nPlease enter a number\n");
scanf("%d",&number);
return number;
}