Make a vactor holding the ten string values: \"zero\",\"one\",....\"nine\". Use
ID: 3616747 • Letter: M
Question
Make a vactor holding the ten string values: "zero","one",...."nine". Use that in a program that converts a digit toits corresponding spelled-out value. Ex. the input 7 gives the output seven. Have the same progam, using the same input loop, convertspelled-out numbers into their digit form. Ex. the input seven gives the output 7. Make a vactor holding the ten string values: "zero","one",...."nine". Use that in a program that converts a digit toits corresponding spelled-out value. Ex. the input 7 gives the output seven. Have the same progam, using the same input loop, convertspelled-out numbers into their digit form. Ex. the input seven gives the output 7.Explanation / Answer
please rate - thanks #include #include using namespace std; int main() {vectordigit(10); string input; int i; bool found; digit[0]="zero"; digit[1]="one"; digit[2]="two"; digit[3]="three"; digit[4]="four"; digit[5]="five"; digit[6]="six"; digit[7]="seven"; digit[8]="eight"; digit[9]="nine"; coutinput; while(input!="done") {found=false; for(i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.