// Skeleton program for exercise // You should replace the comments given in upper case letters with // appropriate C++ code // Header file #include // Function Prototype int factorial (int num); // Main function int main (void) { // Variable Declaration int num; // Input number int count = 0; // variable to keep track of the index variable in // for/while loop // WRITE A FOR LOOP OR WHILE LOOP THAT DOES THE FOLLOWING FOR 10 TIMES // READS THE NUMBER "num" USING "cin" // CALLS THE "factorial" FUNCTION AND PRINTS THE RESULT // return success return 0; } // Function Definition of factorial int factorial (int num) { // local variable declaration int n; int fact = 1; // statements // WRITE A FOR LOOP THAT COMPUTES THE FACTORIAL // FACTORIAL OF 1 = 1 // 2 = 1 * 2 // 3 = 1 * 2 * 3 // n = 1 * 2 * 3 * ... * n // return result return fact; }