首页 > 留学知识库

问题: 程序题

编写一个程序,判断任意输入的整数的奇偶性,并画出程序图

解答:

iuput k
if(k mod 2 is 0) then output "k 是偶数"
else output "k 是奇数"