Question: Only can include #include #include #include Write a program that reads in any characters from the keyboard, sums up only characters corresponding to a digit

Only can include
#include
Write a program that reads in any characters from the keyboard, sums up only characters corresponding to a digit and prints the result on the screen. The program will exit when the character 'Q is entered (upper or lowercase). The char data type treats characters as decimal numbers and uses ASCII (American Standard Code for Information Interchange). Follow the link and use the table to find the character encoding for the digits [0-9]. You will also need the atoi() function from the stdlib to convert ascii to integers. See http://en.cppreference.com/w/c/string/byte/atoi for an example or use google to find some examples. if the input is not a digit you should print the message Input is not a digit For example: Input Output 98q The total is 17 8 QThe Input is not a digit The total is 17 9 a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
