精品学习网
所在位置:主页 > 机器人 > 一个机器人每步可以走1米,2米,3米.写出一个程序,列出机器人走n米的所有走法.

一个机器人每步可以走1米,2米,3米.写出一个程序,列出机器人走n米的所有走法.

发布时间:2022-12-06 12:00来源:www.51edu.com作者:畅畅

一、一个机器人每步可以走1米,2米,3米.写出一个程序,列出机器人走n米的所有走法.

#include

void main()

{

int n;

int x,y,z; //x表示一米的走了多少步,y表示2米,z表示3米.

printf(nPlease input the distance the robot walked:);

scanf(%d, &n);

for(x=0;x

  • 热门资讯
  • 最新资讯
  • 手游排行榜
  • 手游新品榜