zoukankan      html  css  js  c++  java
  • C Primer 编程练习

    2.1

    #include<stdio.h>
    int main(void)
    {
        printf("Co Khime ");
        printf("Co Khime ");
        printf("Co ");
        printf("Khime");
        return 0;
    }

    2.2

    #include<stdio.h>
    int main(void)
    {
        printf("Co Khime ");
        printf("YiLaiAn");
        return 0;
    }

    2.3

    #include<stdio.h>
    int main(void)
    {
        int y;
        y = 25;
        printf("Khiem is %d year old and she has live %d days", y, 365 * y);
    }

    2.4

    #include<stdio.h>
    void jolly(void);
    void deny(void);
    int main(void)
    {
        jolly();
        jolly();
        jolly();
        deny();
    }
    void jolly(void)
    {
        printf("For he's a jolly good fellow! ");
    }
    void deny(void)
    {
        printf("Which nobody can deny!");
    }

    2.5

    #include<stdio.h>
    void br(void);
    void ic(void);
    int main(void)
    {
        br();
        printf(",");
        ic();
        printf(" ");
        ic();
        printf(", ");
        br();
        
    }
    void br(void)
    {
        printf("Brazil, Russia");
    }
    void ic(void)
    {
        printf("India China");
    }

    2.6

    #include<stdio.h>
    int main(void)
    {
        int toes;
        toes = 10;
        printf("toes is %d , Double toes is %d and Quare toes is %d", toes, 2 * toes, toes * toes);
        return 0;
    }

    2.7

     #include<stdio.h>
    void sme(void);

    int main(void)
    {
        sme();
        sme();
        sme();
        printf(" ");
        sme();
        sme();
        printf(" ");
        sme();
    }
    void sme(void)
    {
        printf("Smile!");
    }

    -------------------------------------------------------------------------------------------------------------------------------------------------

    3.1

     3.2

    #include<stdio.h>

    int main(void)
    {
        int number;
        printf("plaease enter the number of char ");
        scanf("%d",&number);
        printf("the char of the number is %c",number);
        return 0;
    }

  • 相关阅读:
    眼手组合-眼低手低者
    MongoDB、redis、memcached
    CAS单点登录配置 .
    Static attribute must be a String literal
    myeclipse 导包快捷键
    java生成json总结
    weblogic部署错误:weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory
    xfire+spring webservice
    java中获取当前路径(转)
    MyEclipse使用指南(精简版) (转)
  • 原文地址:https://www.cnblogs.com/Khime/p/11622560.html
Copyright © 2011-2022 走看看