Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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
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;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

error bar charts

Answered: 1 week ago