Assignment Factorial and Power
Assignment: Factorial and Power
This assignment is to help you review C-programming for Numerical Programming.
Do NOT use Chat-GPT and online materials.
You can do it all by yourself !!
Problem
Q1. Create power(x,N) function that returns
double power(double x, int N);Q2. Create factorial(x) function that returns
Hint
Preparation
You must complete the following tutorials first.
Procedure
Create a new project “ Assignment_powerNfactorial” with Visual Studio Community.
It should be under the designated folder of
\NP\assignment\
...\source\repos\NP\assignment\Assignment_powerNfactorial\
Create a new source file
name it as
Assignment_powerNfactorial_yourName.cppor you can copy the file from here: Assignment_powerNfactorial_student.cpp
Fill in the definitions of power() and factorial()
Run the code and validate the answers
Capture the output window and paste in the report
Submit
Submit as “Assignment_powerNfactorial_yourName.zip” that includes
1) Source code
submit only “Assignment_powerNfactorial_yourName.cpp”
2) Report: “Assignment_powerNfactorial_yourName.pdf”
Download the report template: NP_Assignment_Factorial_YourName_2025.docx
Code
Last updated
Was this helpful?