getche();

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()函数  这两个函数都是从键盘上读入一个字符。其调用格式为: ...
默认分类 | 2009-11-11 08:33 | 阅读 1041 次 | 评论 0 条

%号输出

#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",&amp;score[0]); while(score[num]>=0&amp;&amp;i<=N) /*以负数结束输入*/ { num++; scanf("%f",&amp;score[num]); ...
默认分类 | 2009-11-03 20:28 | 阅读 725 次 | 评论 0 条
文章分类