1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ludmilka [50]
3 years ago
11

Write a C++ program that takes a single character and prints the corresponding digit on the old-style dial or touchtone telephon

e keypad, if it exists, or a message stating that the character does not correspond to a digit on the keypad.
Computers and Technology
1 answer:
I am Lyosha [343]3 years ago
3 0
Ok thanks Ianswer: c++
You might be interested in
Charles sends Julia text messages every morning insulting her appearance and threatening to hurt her. He writes unflattering des
aalyn [17]
What is the question?
4 0
3 years ago
Read 2 more answers
Write a function called getChar that has no function inputs, but takes in two character inputs from the user (in1 and in2) and o
bearhunter [10]

Answer:

def getChar():

   while True:

       in1 = input('Enter first char: ')

       try:

           if len(in1) != 1:

               raise

           else:

               in2 = input('Enter second char: ')

               if len(in2) != 1:

                   raise

               else:

                   break

       except:

           print('Enter just one character')

   return in1, in2

def chars2string(in1,in2):

   print(in1*5 + in2*5)

def main():

   ls = getChar()

   in1 = ls[0]

   in2 = ls[1]

   chars2string(in1, in2)

if __name__ == '__main__':

   main()

Explanation:

The programming language used is python 3.

The script first defines a function getChar and makes use of a while loop in combination with try and except blocks and IF statements, the code ensures that both inputs that are entered by the user after the prompt are 1 in length. i.e. Just one character. This function returns the two characters that were entered.

The second function that is defined is chars2string this function takes two arguments, It repeats each argument five times and returns a joined string.

Finally, the main function is defined and it calls the getChar function  first, the values that are returned by this function is assigned to two variables, that is then passed on to the chars2string function. The main function is called and the Joined string is printed to the screen.

3 0
3 years ago
Function Integer cube(Integer num) Return num * num * num End Function Write a main module that contains a statement that passes
Klio2033 [76]

Answer:

#include <iostream>

using namespace std;

int cube(int num)//function cube..

{

   return num*num*num;

}

int main() {

   int result=cube(4);//result stores the value of cube(4).

   cout<<result;//displaying it to the screen.

return 0;

}

Explanation:

The above code is in C++ language.The function cube is passed with value 4 and the result of it is stored in the variable result of integer type.Then the result is displayed using the cout. Which is used to print the statement to the output screen.

5 0
3 years ago
30 POINTS!!
Snowcat [4.5K]

Answer:

paragraph or by a break line space

5 0
3 years ago
HELPPP! MARK YOU THE BRAINLIEST!
bogdanovich [222]

Answer:

My goal is to have good grades because I failing now and I want to try and try to get my grade up if I do I will be successful and when I grow up I will have a good job and a better life for me and my family.If I success my life will be so different.

5 0
2 years ago
Other questions:
  • The collodion process was significantly more expensive than the cost of a daguerreotype
    10·1 answer
  • Which of the Arts, A/V Technology, and Communication career cluster pathways are involved with producing a product for an audien
    8·2 answers
  • Darpa was created to
    13·1 answer
  • An iframe is an inline table for a website. True False i need an answer fast
    15·1 answer
  • To save a document with a new name, click _______ in the navigation bar and enter a new filename.
    12·1 answer
  • Whose massively popular photo led to the creation of google images?
    12·1 answer
  • Which of the following access control techniques allows the user to feel empowered and able to change security attributes?
    5·1 answer
  • Plzz help me with this question.........
    6·1 answer
  • Leo needs to consolidate data in multiple worksheets by performing a calculation across all worksheets on the same cells.
    12·2 answers
  • 2. As you have learned, ironically, a large part of sound production involves visual perception. How easy or difficult did you f
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!