getchar() 函数名:getchar() 头文件:stdio.h 功 能:从I/O流中读字符 原 型:int getchar(void); getch() 函数名:getch(): 头文件:conio.h 功 能:从控制台读取一个字符,但不显示在屏幕上 原 型:int getch(void) 返回值:读取的字符 getche() 函数名:getche 头文件:conio.h 功 能:从控制台取字符(带回显) 用 法:int getche(void); (1) getch()和getche()函数 这两个函数都是从键盘上读入一个字符。其调用格式为: ...
#include "stdio.h"
#include "stdlib.h"#define N 100int main(void){ int n=0,i,num=0; float score[N],ave=0,per; printf("input the scores of class:\n"); scanf("%f",&score[0]); while(score[num]>=0&&i<=N) /*以负数结束输入*/ { num++; scanf("%f",&score[num]); ...