Hello. Can anyone help me with my code? I've restarted so many times and I'm just exhausted. It's due tonight.
bool checkCode(char);
{
void writeDataToFile(const char *);
void readDataFromFile(const char *);
double findNyanCatValue(double myNum, double last, double steps)
{cout
do
{
if(myNum
{ value= myNum;
int x= 6;
int i=1;
while(i { x= x*6; }
value =((2 * value)+ (value * x));
cout
myNum = myNum + steps;
if(myNum > last)
{break;}
}
}while(myNum
return value;
}
int factorial(unsigned int n)
{
unsigned long long factorial = 1;
cout
cin >> n;
for(int i = 1; i
{
factorial *= i;
}
cout
return 0;
}
int fibonacci(int n)
{
t1 = 0, t2 = 1, nextTerm = 0;
cout
cin >> n;
cout
for (int i = 1; i
{
// Prints the first two terms.
if(i == 1)
{
cout
continue;
}
if(i == 2)
{
cout
continue;
}
nextTerm = t1 + t2;
t1 = t2;
t2 = nextTerm;
cout
}
return 0;
}
double findSqrtValue(double square, double last, double steps)
{
double value;
cout
do
{
if(square
{
value = square;
double root=value/3;
int i;
if (value
for (i=0; i
root = (root + value / root) / 2;
cout
square = square + steps;
if(square > last)
{break;}
}
}while(square
return root;
}
double naturalLog(double l)
{cout
int findNextOddValue(int d);
You need to write a C++ program that will interactively accept commands from the user. Each command is a single character followed by one, two, or three parameters and specifies a function that needs to be performed. Your program must do the following Ask the user for the next command code-"Please enter command code : " Read the command code . If the command is illegal, print an appropriate error message "Invalid command code" . else if the command is quit, terminate the program . else ask the user for the parameters- "Please enter command parameters:" . Read the arguments Execute command Your program must continue this loop until the "quit" command is given. Commands that you need to include: Forf B or b Rorr D or d Compute the Factorial value Compute the flBonacci number Compute square Roots Compute oDd numbers Given an integer number Given an integer index The sqrt