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;
    }

  • 相关阅读:
    2331: [SCOI2011]地板 插头DP
    APIO2018 铜滚记
    2827: 千山鸟飞绝 非旋treap
    3682: Phorni 后缀平衡树 线段树
    4712: 洪水 基于链分治的动态DP
    20180507小测
    4923: [Lydsy1706月赛]K小值查询 平衡树 非旋转Treap
    5312: 冒险 线段树 复杂度分析
    5210: 最大连通子块和 动态DP 树链剖分
    4513: [Sdoi2016]储能表 数位DP
  • 原文地址:https://www.cnblogs.com/Khime/p/11622560.html
Copyright © 2011-2022 走看看