Wednesday, December 1, 2010

IT5 Lab Exercise 3

It will be checked on December 7, 2010


The factorial method is used frequently in probability problems. The factorial of a positive integer n (written n! and pronounced “n factorial”) is equal to the product of the positive integers from 1 to n. Even for relatively small values of n, the factorial method yields extremely large numbers. For instance, when n is 13, n! is 6227020800—a number too large to be represented with data type Integer (a 32-bit integer value). To calculate the factorials of large values of n, data type Long (a 64-bit integer value) must be used. Write a program that evaluates the factorials of the integers from 1 to 20 using data type Long. Display the results in a two column output table. [Hint: create a Windows application, use Labels as the columns and the vbCrLf constant to line up the rows.] The first column should display the n values (1–20). The second column should display n!.

0 comments:

About

My photo
Hi! Mabuhay everyone! I am Mark Van M. Buladaco! I am from Davao City! Hope you enjoy my blog!

Contact me

476 alley Malvar St., Davao City, Philippines
celticguardiandancingelf@yahoo.com
Web Marketingdrive recovery software