Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can you please help me find the 5 errors to this program and comment on where th

ID: 3915467 • Letter: C

Question

Can you please help me find the 5 errors to this program and comment on where the issues are?
#include "stdafx.h" // Visual Studios PC only #include <iostream> using namespace std; #include "string"
int myFactorial( intt integer) { if( integer == 1) return 1; else { return (integer * (myFactorial(integer-1))); } }
int main() {
int j == 10; string myName = "NoName"; cout << "Output sentence" << endl; cout << 120 << endl;    cout << j << endl; // prints out the value of x
fi (( j == 0 ) || ( myName == "NoName" )) { cout << "J equals 0 OR myName equals NoName" << endl; } else { cout << "None are true" << endl; }
for ( int i = 0; i < 5; i++) { cout << "Please enter an integer value: "; cin >> j; cout << "The value you entered is " << j; cout << " and its double is " << i*2 << ". "; // print out double value }    cout << "Enter your first and last name: "; cin >> myName; cout << "My first and last name is " << myName << endl;
cout << "The factorial of 15 is " << myFactorial(15)<< endl; system("pause");
return 0; Can you please help me find the 5 errors to this program and comment on where the issues are?
#include "stdafx.h" // Visual Studios PC only #include <iostream> using namespace std; #include "string"
int myFactorial( intt integer) { if( integer == 1) return 1; else { return (integer * (myFactorial(integer-1))); } }
int main() {
int j == 10; string myName = "NoName"; cout << "Output sentence" << endl; cout << 120 << endl;    cout << j << endl; // prints out the value of x
fi (( j == 0 ) || ( myName == "NoName" )) { cout << "J equals 0 OR myName equals NoName" << endl; } else { cout << "None are true" << endl; }
for ( int i = 0; i < 5; i++) { cout << "Please enter an integer value: "; cin >> j; cout << "The value you entered is " << j; cout << " and its double is " << i*2 << ". "; // print out double value }    cout << "Enter your first and last name: "; cin >> myName; cout << "My first and last name is " << myName << endl;
cout << "The factorial of 15 is " << myFactorial(15)<< endl; system("pause");
return 0; Can you please help me find the 5 errors to this program and comment on where the issues are?
#include "stdafx.h" // Visual Studios PC only #include <iostream> using namespace std; #include "string"
int myFactorial( intt integer) { if( integer == 1) return 1; else { return (integer * (myFactorial(integer-1))); } }
int main() {
int j == 10; string myName = "NoName"; cout << "Output sentence" << endl; cout << 120 << endl;    cout << j << endl; // prints out the value of x
fi (( j == 0 ) || ( myName == "NoName" )) { cout << "J equals 0 OR myName equals NoName" << endl; } else { cout << "None are true" << endl; }
for ( int i = 0; i < 5; i++) { cout << "Please enter an integer value: "; cin >> j; cout << "The value you entered is " << j; cout << " and its double is " << i*2 << ". "; // print out double value }    cout << "Enter your first and last name: "; cin >> myName; cout << "My first and last name is " << myName << endl;
cout << "The factorial of 15 is " << myFactorial(15)<< endl; system("pause");
return 0;

Explanation / Answer

//#include "stdafx.h" // Visual Studios PC only #include using namespace std; #include "string" int myFactorial(int integer) // Error. it should be int but not intt { if (integer == 1) return 1; else { return (integer * (myFactorial(integer - 1))); } } int main() { int j = 10; // Error. use assignment operator =, but not comparision operator == string myName = "NoName"; cout