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

I am in the process of writing a program in java to convertletters to phone numb

ID: 3608349 • Letter: I

Question

I am in the process of writing a program in java to convertletters to phone numbers. This is a question from D.S.Malik 3rdedition Java Programming (PE5)
I have to convert a given input (letters) into corresponding phonenumbers. for example GET-LOAN will be 438-5626. What is confusingme is that I will have a string assigned to each alphabet, for eg(a,b,c) should print 2, now how will I tell java to take the valueof charat(0) compare it with a string and store it someplace, andthen repeat it for the next value str.charat(1) andplace/print it next to or after charat(0) ? assuming that stris the string. I am in the process of writing a program in java to convertletters to phone numbers. This is a question from D.S.Malik 3rdedition Java Programming (PE5)
I have to convert a given input (letters) into corresponding phonenumbers. for example GET-LOAN will be 438-5626. What is confusingme is that I will have a string assigned to each alphabet, for eg(a,b,c) should print 2, now how will I tell java to take the valueof charat(0) compare it with a string and store it someplace, andthen repeat it for the next value str.charat(1) andplace/print it next to or after charat(0) ? assuming that stris the string.

Explanation / Answer

//Here is c++ program that will convertstring to phone number, hope this will helpyou.. #include #include #include using namespace std; int main(){ string str; int len;int i; long phone_num=0,count=0; char *p; cout= '0' && str[i]