我对编程非常陌生,目前正在开发一个程序(它几乎没有接近完成的地方),但我无法弄清楚它是如何以及为什么不起作用的。我必须缺少的“如果”和“其他”循环的C程序问题
#include <stdio.h>
int main(void)
{
printf("Welcome to the ROBOT GAME!\n"
"Please enter the column of your starting point. Keep numbers in the range of one to three.\n");
int a, b;
if(1<=a<=3);
{
scanf("%i", &a);
}
else
{
printf("Sorry try again.");
}
printf("Please enter the row of your starting point. Keep numbers in the range of one to three.\n");
if(1>=b<=3);
scanf("%i", &b);
printf("What is your next move? Pick\n"
"1.Right\n"
"2.Left\n"
"3.Up\n"
"4.Down\n");
}
请阅读一个基本的C教程。 – 2014-09-20 05:05:14
'C程序问题与循环'哪里是循环? [需要学习关于'C'的基本知识](http://www.tutorialspoint.com/ansi_c/c_introduction.htm) – 2014-09-20 05:06:45
在'if(<= 2 = 3)之后移除';'' – Rustam 2014-09-20 05:21:49