有条件的陈述如何真正需要帮助,尝试了一切都无法使其发挥作用

编程入门 行业动态 更新时间:2024-10-24 07:26:52
本文介绍了有条件的陈述如何真正需要帮助,尝试了一切都无法使其发挥作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您想要写一个条件陈述,确定一个人的年龄是否属于老年人类别。假设年龄范围从60到100,包括60和100. 写下你的陈述条件并提交。 我尝试了什么: 我已经尝试过我能想到的一切但仍然无法得到它对,我以为 grade> = 60&&等级< = 100 是答案,但没有得到它

解决方案

是的,这是正确答案。你硬编码60和100很糟糕,但是它会起作用。 完全不清楚你没有得到什么。也许你在这个表达式的上下文中遇到了一些问题,但是你必须在编写时显示上下文。
-SA

You want to write a conditional statement that determines whether a person's age is in the senior citizen's category. Let's say the age range is from 60 to 100, inclusive of 60 and 100. Write your condition for the statement and submit it. What I have tried: ive tried doing everything i can think of and still cant get it right, i thought that grade>= 60 && grade <= 100 was the answer but didnt get it

解决方案

Yes, this is right answer. It's bad that you hard-coded 60 and 100, but it will work. It's totally unclear what you "didn't get". Maybe you have some problem in the context of this expression, but then you have to show that context as you wrote it.
—SA

更多推荐

有条件的陈述如何真正需要帮助,尝试了一切都无法使其发挥作用

本文发布于:2023-11-15 23:14:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1598819.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:一切都   使其   有条件   发挥作用

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!