以下为程序代码及执行结果:
#include <stdio.h>
#include <windows.h>
int main()
{printf("hello world!\n");
system("pause");
return 0;}
执行结果:
扩展资料:
C语言有多个函数可以从键盘获得用户输入,它们分别是:
scanf():和 printf() 类似,scanf() 可以输入多种类型的数据。
getchar()、getche()、getch():这三个函数都用于输入单个字符。
gets():获取一行数据,并作为字符串处理。