sửa lại :
#include "stdio.h"
#include "conio.h"
Đây là bài toán xuất ra màn hình bản cửu chương 2--9.Gồm 8 bảng bố trí 4 bảng ở đầu trên màn hình,4 bảng sau ở nửa dưới màn hình.
Khi chạy thì xuất hiện những lỗi sau.#include <stdio.h>
#include <conio.h>
main ()
{
int c,h,i,k;
puts("\n Bang cuu chuong");
Printf(" --------------------------------");
puts("-------------------");
for(h=0;h<=1;h++)
{
c=4*h;
for(k=1;k<=9;k++)
{
for(i=2+c;i<=5+c;i++)
printf("%8d*%d=%3d",i,k,i*k);
puts("");
}
printf(" -------------------------------");
puts("--------------------");
}
getch();
}
Xin hỏi mỗi người lỗi này là lỗi gì vậy,xin chỉ giáo giúp dùm em cảm ơn nhiều lằm.g++ test2.c
test2.c:2:19: error: conio.h: No such file or directory
test2.c:26:2: warning: no newline at end of file
test2.c: In function ‘int main()’:
test2.c:9: error: ‘Printf’ was not declared in this scope
test2.c:25: error: ‘getch’ was not declared in this scope
sửa lại :
#include "stdio.h"
#include "conio.h"
None!
hì cảm ơn bạn đã trả lời vẫn lỗi như thế
g++ test2.c
test2.c:2:19: error: conio.h: No such file or directory
test2.c:26:2: warning: no newline at end of file
test2.c: In function ‘int main()’:
test2.c:9: error: ‘Printf’ was not declared in this scope
test2.c:25: error: ‘getch’ was not declared in this scope
check lại đường dẫn tói 2 thư viện : stdio và conio
sai chính tả : printf chứ kô phải Printf
compiler của bạn không cho phép newline cuối file .. kô sao cả .
nếu viết là : main() thì phải có giá trị trả về : return 0;
Vậy thôi là chạy được ^.^
None!
Check link làm sao hả cậu.Hic xài linux nhưng ở mưc độ newbie thui.Biêt xin chỉ giáo.check lại đường dẫn tói 2 thư viện : stdio và conio
Nếu dùng Borland C++ thì xem mấy mục cài đặt Borland nha .
None!
hi` cam on cau. to lam dc rui ^^.