Yêu cầu: In dòng chữ “Hello World” ra màn hình console.
Phân tích: Để hiển thị chuỗi kí tự ra màn hình console, bạn dùng hàm printf().
Code:
1 2 3 4 5 6 7 8 9 10 |
/**********************HELLO WORLD*************************** #include "stdio.h" #include "conio.h" void main() { printf("\n Hello world"); getch(); } |
Kết quả:
1 |
Hello world |
Leave a Reply