复利计算6.0

复利计算再升级------------------------------------------------------------

客户在大家的引导下,有了更多的想法:

  1. 这个数据我经常会填.....帮我预先填上呗?......
  2. 把界面做得简单漂亮好操作一点呗?
  3. 能不能帮我转成个APP,我装到手机上就更方便了?
  4. 我觉得这个很有用,很多人可能都需要这些功能,做到我的微信公众号上吧?
  5. 能不能不要让我填表单,让我发条消息,或者对着手机说句话就可以了?

每组选一两个方向加以改进,让我们的投资计算与记录工具,达到可以发布给用户使用的版本,并发布博客对此次更新进行说明与总结。

截止日期:2016.4.14晚11点。

 

周五的时候同学们相互观看与评价。

结对同学:甄增文-201406114233

博客地址: http://home.cnblogs.com/u/zhenzengwen/

利用了SetConsoleTextAttribute()函数进行了界面的更新

void main()
{

    HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);  // 获取控制台句柄
    while(1){
    int num=7;
    duqu();
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY |FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
    printf(" \n");
    printf(" \n");
    printf(" \n");
    printf(" \n");
    printf(" \n");
    printf(" \n");
    printf("                      -------------------------------------\n");
    printf("                      |       欢迎来到广州商业银行        |\n");
    printf("                      |       顾客你可以根据0~7选择       |\n");
    printf("                      |        0.清空动态显示             |\n");
    SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_RED);
    printf("                      |        1.复利计算                 |\n");
    SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_GREEN);
    printf("                      |        2.单利计算                 |\n");
    SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN);
    printf("                      |        3.养老金计算               |\n");
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY |FOREGROUND_RED | FOREGROUND_BLUE);
    printf("                      |        4.股票计算                 |\n"); 
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY |FOREGROUND_GREEN | FOREGROUND_BLUE);
    printf("                      |        5.投资计算                 |\n");
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY |FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
    printf("                      |        6.定额定投收益计算         |\n");
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY |FOREGROUND_BLUE);
    printf("                      |        7.贷款                     |\n"); 
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY |FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
    printf("                      --------------------------------------\n");
    printf(" \n");
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY |BACKGROUND_INTENSITY);
    printf("请根据数字选择你需要的功能(0~7)\n");
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY |FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
    scanf("%d",&num);
    switch(num)
    {
    case 0:
        clean();
        break;
    case 1:
        printf("\n");
        fuli();
        save();
        break;
    case 2:
        printf("\n");
        danli();
        save1();
        break;
    case 3:
        printf("\n");
        fanxiang();
        save2();
        break;
    case 4:
        printf("\n");
        gupiao();
        save3();
        break;
    case 5:
        printf("\n");
        touzi();
        save4();
        break;
    case 6:
        printf("\n");
        ligunli();
        break;
    case 7:
        printf("\n");
        daikuan();
        save6();
        break;
    }
}
}

动态显示大致是与其颜色对应的选项.

https://github.com/zzzzzz1234/Huazy/blob/master/fuli8.c

posted @ 2016-04-14 20:13  34华子仪  阅读(203)  评论(4编辑  收藏  举报