Jump to content

Factorials of integers from 1-5

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Lesser_Intellect

Lesser_Intellect

    Newbie

  • Members
  • PipPip
  • 16 posts
Hi,

May I have some tips on how to write this program please.

Write a program in C that evaluates the factorials of the integers from 1-5. Print the results in tabular format. What difficulty may prevent you from calculating the factorial of 50?

#2
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,298 posts
just loop the integers and write it's factorials for each one as a result of the multiplication, as a second loop.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Also, 50! is a massively huge number (more than 100 digits long), so you're going to have a tough time storing it in an int.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog