Hereis my last problem for the week. I talked to the prof on email and still dont understand what he wants. I am going to post my problem and could someone explain to me what this actually means, I am really lost.
We can not use math or cmath library in thie program.Code:Write a C++ Program to calculate the following function: PowerInt(n) = (n!)/n(2) , if n<=1 and n<=10 Power Int (0) = 1 PowerInt (n) = error, if n<0 or n>10 Where n! = 1*2*3...*n for n>=1. For example: PowerInt (1) = 1!/1(2) =1 PowerInt (2) = 2!/2(2) = (1*2)/(2*2) = 2/4 =0.5 PowerInt (3) = 3!/3(2) = (1*2*3)/(3*3) = 6/9 =0.667 PowerInt (4) = 4!/4(2) = (1*2*3*4)/(4*4) = 24/16 =1.5



LinkBack URL
About LinkBacks


