Factorial

From Programming In C

Exercise 3.2

Write a program to calculate the factorial of a given integer. The integer should be inputted from the keyboard. Investigate what the largest number for which factorial can be correctly calculated is. Modify your program so that it rejects an inputted number that is too large and demands a new value.


Next exercise

Return to course summary

phy225: Course Details

general


compilers


2011-12 assessments


past exam papers

  • 2008-9 (http://physics-database.group.shef.ac.uk/exampapers/2008-09/PHY225%20LT.pdf)
  • 2009-10 (http://physics-database.group.shef.ac.uk/exampapers/2009-10/PHY225%20Exam%20Sem%201%202009-10.pdf)
  • 2010-11 (http://physics-database.group.shef.ac.uk/exampapers/2010-11/PHY225_10_11.pdf)