全文预览

c例题习题

上传者:qnrdwb |  格式:pdf  |  页数:71 |  大小:3472KB

文档介绍
\rSÀ¼UÁhÂ0«ÁhÂ0h0|}XYSÃhi0?.\r# include stdio. h > <\rvoid main ().\rchar text [3] [80];\rint i, j, upp = 0, low = 0 = 0 = 0 digit, space, others = 0;\rfor (i = 0; i < 3; i + +)\r(\rfor (j = 0, j < 80; j + +)\rgets (text [in]);\rif (text [in] [j] > = ' a' & & text [in] [j] < = ' z')\rupp + +;\relse if (text [in] [j] > = ' a' & & text [in] [ j ] Ä = ' z')\rlow + +;\relse if (text [in] [ j ] Å= ' O' & & text [in] [j] < = ' 9')\rdigit + +;\relse if (text [in] [ j ] = = '')\rspace + +;\relse.\rothers + +;\rprintf ("upp% d, low% d% d% d space, digit, others% d \ n”, upp,\rlow space, digit, others);

收藏

分享

举报
下载此文档