נשלח בתאריך: 24 November 2007 בשעה 16:01 | | IP רשוּם
|
|
|
|
Well try to think, you need a loop, lets say while that run as long a certain flag is true: while(flag=1)
You can also use the break command instead, to jump out of the loop.
Then in the loop you ask the user to inter some data – using: scanf and printf.
Then make some tests to make sure the what you have an integer, you can use the function strtol, and you can compare if the number you have is smaller then INT_min and bigger then INT_max
Use ‘if’ and ‘else if’ or ‘switch’ to make sure the right thing is being handle in the Loop, after that change the flag to 0
Good luck!
|