我是C編程新手,剛剛遇到此程序並出現問題。它說它在我表示的線上有錯誤。任何人都可以幫忙嗎?printf在編譯時顯示錯誤
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
float a;
printf("Hello world!\n");
scanf("%d",&a)
printf("you entered: %f",a);//here is the error
getch()
}
我正在使用CodeBlocks。
只有一個評論:'conio.h'不是標準C庫的一部分。 'getch()'也不是:http://en.wikipedia.org/wiki/Conio.h你可能想考慮不使用這些EVER :) – ArjunShankar 2012-04-03 15:11:04
下次,請發佈你得到的實際錯誤信息。 – 2012-04-03 15:29:05