这程序有什么问题啊

#include<stdio.h>
int main()
{
int i=1,t=2,a;
scanf("%d",&a);
while(t<=a);
{
i=i*t;
t=t+1;
}
printf("the number!=%d\n",a);
return 0;
}
我想你是想胡冲算a的阶乘吧??橘蚂

那printf("the number!=%d\n"裤伍歼,a);
改成printf("the number!=%d\n",i);
前面喊胡没旦渗拦有添加变量t

print语句改为:printf("the number!=%d\n"模胡,i);
  1. 你只输入了念数旅一次,仔凳while只循环了一次,用while没有意义。

  2. printf打印a的值,你不是想知毕纯道i和t的值吗?

  3. 你具体想干啥,说出来让别人给你看看逻辑