Question: **** The next three problems are coding problems. I suggest that you copy and paste the problems into your IDE and comment ther. This will

**** The next three problems are coding problems. I suggest that you copy and paste the problems into your IDE and comment ther. This will keep you from switching between your IDE and browser. It should save you time. Write an empty main function and include the standard input/output library. Write a function called encode() that accepts 3 characters and returns an integer that's constructed from the chars as the first char is hundreds, the second is tens and the third is ones. So if the three chars are 1, 2 and 3, the int should be 123. If the int is even return 1/2 its value, the full value otherwise. Hint: for char c set to O, the ASCII number is 48, 50 C -48 = 0. If you subtract 48 from a digit char, you get its decimal value. Add a prototype for your encode function. Add code to your main function to test your code. Use (1, 2, 3), (2, 4, 6) and (3, 2, 1) to test your code. The output for these is below. Output 123 123 321 Copy your code and paste it below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
