Write a program which reads a series of tokens from standard input.It should print out the sum of all the tokens that are integers, the sum of all the tokens that are floating-point numbers, but not integers, and the total number of tokens of any kind. For example, if input contains the following tokens: 3 3.14 10 squid 10.x 6.0 Then sumInput(); should print the following output: integers: 13 real numbers: 9.14 total tokens: 6 If the input stream as no tokens, the function should print:

Solved
Show answers

Ask an AI advisor a question