How to take a input from keyboard using fgets and atoi?

Intead of using scanf("%d",&a) to take a input from the user,how to take a input using fgets(buffer, BUFFERSIZE , stdin) and atoi?

Could anyone show me an example? Thanks
Last edited on
The inputs are all integers.
Topic archived. No new replies allowed.