测身高的C语言程序
测量身高C语言程序:主程序:// header file#include <stdio.h>// define readonly variableconst char* const ERR_STRIN
测量身高C语言程序: 主程序: //headerfile #include<stdio.h> //definereadonlyvariable constchar*constERR_STRING="您输入的字符有误,请重新"; constchar*constINFO_STRING= "*******************************************************"; //willcallthisfunctionwheninputh__eerror voidPrintErr(void) { printf(ERR_STRING); while(getchar()!='\n'); } //getalowerchar charGetLowerChar(constchar*str) { charc; puts(str);//outputinfo__tionforinput scanf("%c",&c); return(c>='A'&&c<='Z')?c+32:c;//translatetolower } //Getacharchooseina&b. //othercharacterwill__keerror intLoopInputChar(constchar*str,chara='y',charb='n') { chara1=GetLowerChar(str); for(;a1!=a&&a1!=b;a1=GetLowerChar(str+2)) PrintErr(); returna1; } //Getadouble-typevalue doubleGetDouble(constchar*str) { doubled; for(puts(str);scanf("%lf",&d)!=1;puts(str+2)) PrintErr(); returnd; } //staturetest voidStatureTest() { charc,ys; doublefu,mu,wo,wo2;

