zoukankan      html  css  js  c++  java
  • 例3--10

    #include<stdio.h> int main(void) {  int blank,digit,other;  char ch;  int i;  blank=digit=other=0;  printf("Enter 10 characters:");  for(i=1;i<=10;i++){   ch=getchar();

      switch(ch){     case ' ':           case ' ':      blank++;      break;

        case'0':case'1':case'2':case'3':case'4':     case'5':case'6':case'7':case'8':case'9':          digit++;       break;

        default:        other++;        break;

      }  }  printf("blank=%d,digit=%d,other=%d ",blank,digit,other);

     return 0; }

  • 相关阅读:
    购物菜单
    增删改查
    第七次Android
    第七次作业
    第四次作业
    第二次作业
    第七次
    第二次作业
    第三次作业
    第六周安卓作业
  • 原文地址:https://www.cnblogs.com/2013djj/p/3353835.html
Copyright © 2011-2022 走看看