Question
I need help with C++ the answers is not coming out to true or false and its printing out the numbers. Code: #include using namespace
I need help with C++ the answers is not coming out to true or false and its printing out the numbers.
Code:
#include
bool isLetter(char letter); bool isNumber(char num); void capitalize(char& letter); void spaceToComma(string& list); bool first10Last(int data[], int size); bool equalFirstLast(int array[], int size); void printArray(int array[], int size); void arrayPlus2(int array[], int size); void squareArray(int array[], int size);
bool isLetter(char letter) { int c=letter;
if((c>=65 && c=97 && c
bool isNumber(char num) { int n=num;
if(n>=48 && n
void capitalize(char& letter) { int c=letter; if(c>=97 && c
void spaceToComma(string& list) { int c=0;
for( ; list[c]!='\0'; c++) { if(list[c]==' ') list[c]=','; }
}
bool first10Last(int data[], int size) { if(data[0]==10) return true; else if(data[size-1]==10) return true; else return false; }
bool equalFirstLast(int array[], int size) { if(size>=1 && array[0]==array[size-1]) return true; else return false; }
void printArray(int array[], int size) { cout
}
void arrayPlus2(int array[], int size) { for(int i=0; i void squareArray(int array[], int size) { for(int i=0; i int main() { int result; bool answer; string value; cout cout cout cout cout cout cout cout cout return 0; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started