請教一題C的問題,更正程式的錯誤(我不知道改的對不對)
這題是更正程式的錯誤,但是我想了很久一直想不出來怎麼改
#include stdio.h
main()
{
int num;
char ch;
float value;
printf("Enter two number:");
scanf("%i",num);
scanf("%c",ch);
value= num/ch;
printf("%-6.2f);
}
這是我改的,雖然可以執行,但是我不知道程式的原意是什麼,
所以也不知道對不對
#include <stdio.h>
#include <stdlib.h>
main()
{
int num;
char ch;
float value;
printf("Enter two number:");
scanf("%i",&num);
scanf("%c",&ch);
value=num/ch;
printf("%-6.2f",value);
system("PAUSE");
return 0;
}
|