Loading

PTA|基础编程题目集|7-8

解题

使用基本的判断和输出即可

关键点

  • 选择结构
  • 变量及常量的输出

参考代码

#include <cstdio>
int main(int argc, char const *argv[])
{
	
	int speed;
	scanf("%d",&speed);
	if(speed<=60)
	      printf("Speed: %d - OK\n",speed );
	else
		printf("Speed: %d - Speeding\n", speed);
	return 0;
}
posted @ 2020-10-20 14:27  Devinwon  阅读(127)  评论(0编辑  收藏  举报