![](https://lstatic.shangxueba.com/jiandati/h5/images/m_q_title.png)
[主观题]
检测输入数据中奇数和偶数的个数 题目内容: 从键盘输入一系列正整数,输入-1表示输入结束(-1本身
不是输入的数据)。编写程序判断输入数据中奇数和偶数的个数。如果用户输入的第一个数据就是-1,则程序输出"over!"。否则。用户每输入一个数据,输出该数据是奇数还是偶数,直到用户输入-1为止,分别统计用户输入数据中奇数和偶数的个数。 程序运行结果示例1: Please enter the number: 5↙ 5:odd 8↙ 8:even 12↙ 12:even -1↙ The total number of odd is 1 The total number of even is 2
提问人:网友sduhighxin
发布时间:2022-01-07