某托儿所收2岁到6岁的孩子,
2岁、3岁孩子进小班(Lower class);
4岁孩子进中班(Middle class);
5岁、6岁孩子进大班(Higher class)。
编写程序(用switch语句),
输入孩子年龄,输出年龄及进入的班号
如:输入:3,输出:age:3,enter Lower class
帮忙做一下!

展开全部
收起
6回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • Adrian

    19人对此回答表示赞同

    我觉得Switch应该是age ,case2和5后面应该也输出printf 因为要输出年龄 如果没有的话就输出的是3岁和6岁
    展开
    19
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • Aksel凉凉

    14人对此回答表示赞同

    #include <stdio.h>
    void main()
    {
    int age;
    printf("please input the child age:");
    scanf("%d",&age);
    switch(age)
    {
    case 2:
    case 3: printf("%d,enter the Lower class.\n
    展开
    14
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 有无

    11人对此回答表示赞同

    int age;scanf(%d,age);switch(age);case(2)printf(%d,age);printf("enter Lower class");break;
    case(3)printf(%d,age);printf("enter Lower class");break;case(4)printf(%d,age);printf("enter Middle class");break;case(5)printf(%d
    展开
    11
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 刘二喜

    8人对此回答表示赞同

    int i;scanf("%d"&i);printf("age: %d",i);
    switch(i)case2 ;case3 {printf("ente Lower class");break;}case4 {printf("ente Middle class");break;}case5;case6 {printf("ente Higher class");break;}
    展开
    8
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 杨佑浩

    7人对此回答表示赞同

    #include<stdio.h>
    int main()
    {
    int age;
    printf("输入孩子年龄:\n");
    scanf("%d",&age);
    switch(age)
    {
    case 2:
    case 3:
    printf("%
    展开
    7
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 爱不复生

    3人对此回答表示赞同

    #include <stdio.h>
    void main()
    {
    int age;
    printf("请输入孩子的年龄:");
    scanf("%d",&age);
    switch(age)
    {
    case 2:
    case 3:
    printf("age:%d,enter Lower class\n",age);
    展开
    3
    0回复
    发布于 6年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部