I made a simple program:
#include <stdio.h>
int main()
{
printf("Please enter a value: ");
int uservalue;
scanf("%d", &uservalue);
printf("The value entered was: %d", uservalue);
return 0;
}
As you probably already know, this program has many faults. The ones I found are:
1) The program malfunctions weirdly if the user does not enter a number.
2) Large numbers, like 1000000000, are stored as negative numbers.
Why are these problems occurring and how can I overcome them?
Thanks for any suggestions,
popcorn99