Please follow the code and comments for description : a) CODE : #include // header file using namespace std; double factorial(double n); // required method with the double value int main() // main method { int n; cout << \"Enter a positive integer: \"; // prompt to get the integer value cin >> n; cout << \"Factorial of \" << n << \" = \" << factorial(n); // calluing the function return 0; } double factorial(double n) { if(n!=1) return n*factorial(n-1); // returning the result } OUTPUT : Enter a positive integer: 6 Factorial of 6 = 720 b) CODE : #include // header file #include using namespace std; int main() // main method { int count = 0; // required initialisations string line; ifstream file(\"input.txt\"); //Creating input filestream while (getline(file, line)){ // iterating over the loop to get the data and count count++; cout << line << endl; // printing the data } cout << \"Numbers of lines in the file : \" << count << endl; // print the count return 0; } input.txt : Hi Hello How are You Hope Your are Doing Good See You Tomorrow Good Bye Meet You LAter OUTPUT : Hi Hello How are You Hope Your are Doing Good See You Tomorrow Good Bye Meet You LAter Numbers of lines in the file : 10 Hope this is helpful. Solution Please follow the code and comments for description : a) CODE : #include // header file using namespace std; double factorial(double n); // required method with the double value int main() // main method { int n; cout << \"Enter a positive integer: \"; // prompt to get the integer value cin >> n; cout << \"Factorial of \" << n << \" = \" << factorial(n); // calluing the function return 0; } double factorial(double n) { if(n!=1) return n*factorial(n-1); // returning the result } OUTPUT : Enter a positive integer: 6 Factorial of 6 = 720 b) CODE : #include // header file #include using namespace std; int main() // main method { int count = 0; // required initialisations string line; ifstream file(\"input.txt\"); //Creating input filestream while (getline(file, line)){ // iterating over the loop to get the data and count count++; cout << line << endl; // printing the data } cout << \"Numbers of lines in the file : \" << count << endl; // print the count return 0; } input.txt : Hi Hello How are You Hope Your are Doing Good See You Tomorrow Good Bye Meet You LAter OUTPUT : Hi Hello How are You Hope Your are Doing Good See You Tomorrow Good Bye Meet You LAter Numbers of lines in the file : 10 Hope this is helpful..