简体   繁体   English

需要用blockly来回答,我会附上网站的链接。 不能使用“if”块和方程。 需要使用循环。 先感谢您

[英]Need to use blockly to answer, I will attach the link to the website. Can not use "if" block and equations. Need to use loop. Thank you in advance

Design a program to find the total of all integers from 1 to a number specified by the user.设计一个程序来计算从 1 到用户指定数字的所有整数的总和。 The program should ask the user for the number, and then calculate and display the total from 1 to that number.程序应向用户询问数字,然后计算并显示从 1 到该数字的总数。 The output message format is 'The total from 1 to 5 is 15' where the user enters the number 5, and 15 is the calculated total.输出消息格式为“从 1 到 5 的总数为 15”,其中用户输入数字 5,15 是计算所得的总数。

Can only use "Math" "Text" "Logic" "Loops" and "variable"只能使用“数学”“文本”“逻辑”“循环”和“变量”

Website for building:搭建网站:

https://blockly-demo.appspot.com/static/demos/code/index.html https://blockly-demo.appspot.com/static/demos/code/index.html

i use this site to create the blocks https://developers.google.com/blockly because i have problem with link you put but i they have the same future.我使用这个网站来创建块https://developers.google.com/blockly因为我对你放置的链接有问题,但我他们有同样的未来。 this is the answer :这是答案:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM