• 第一次个人编程作业


    github要求
    创建一个github仓库。 https://github.com/2578039059/xu
    使用git或其他git图形应用程序(Github Desktop,TortoiseGit等)将程序代码传到仓库,commit信息遵守一定的git规范。 不懂什么意思,有没有大佬解释一下
    加入.gitignore文件和开源license。 同上
    随笔要求
    要求记录包括但不限于以下内容:

    1.记录自己的代码行数,需求分析时间,编码时间。
    20-30分钟,3-5小时。
    2.分解需求的思路,分解成多个模块,并阐述为什么这么分,优势在哪,可以附上代码片段。
    本来想用python写的,但语法什么的都忘了,用c写习惯先写主函数,在主函数中输入输出,由于太难,没看懂,
    参考了一下他人的,中文,与阿拉伯数字,符号等使用strcmp(),不知道怎么分,就当成一个算法题
    3.记录不会的知识的学习过程以及修改优化的过程;可以附上资料网站。
    他们的博客是页面怎么改的??10minutes 后 算了。
    蜀道难,好多不会,不一一举例。
    4.自我发挥。
    其他要求
    可以弹性实现题目要求,无论是不完全实现,还是实现更多功能,但要求记录编码和学习过程。
    为了方便其他学校的老师或者助教了解课程实况,请大家在作业开头添加格式描述:

    这个作业属于哪个课程 <班级的链接>
    这个作业要求在哪里 https://edu.cnblogs.com/campus/fzzcxy/SE/homework/10283
    这个作业的目标 <有样例1的输出>
    作业正文 ....
    其他参考文献 ...

    include "stdio.h"

    include "malloc.h"

    include<string.h>

    include<math.h>

    char dx(int n)
    {
    if(n0) printf("零");
    if(n
    1) printf("一");
    if(n2) printf("二");
    if(n
    3) printf("三");
    if(n4) printf("四");
    if(n
    5) printf("五");
    if(n6) printf("六");
    if(n
    7) printf("七");
    if(n8) printf("八");
    if(n
    9) printf("九");
    }
    int change(char s[])
    {
    if(strcmp(s,"一")0)
    return 1;
    if(strcmp(s,"二")
    0)
    return 2;
    if(strcmp(s,"三")0)
    return 3;
    if(strcmp(s,"四")
    0)
    return 4;
    if(strcmp(s,"五")0)
    return 5;
    if(strcmp(s,"六")
    0)
    return 6;
    if(strcmp(s,"七")0)
    return 7;
    if(strcmp(s,"八")
    0)
    return 8;
    if(strcmp(s,"九")0)
    return 9;
    if(strcmp(s,"零")
    0)
    return 0;
    if(strcmp(s,"十")==0)
    return 10;

    }
    int main()
    {
    int sum=0;
    char a[20],b[20],c[20],d[20],ad[20],l[20],x[20],fir[20],num[20];
    char q[20],w[20],e[20],r[20],t[20],y[20],u[20],i[20],o[20];
    scanf("%s %s %s %s",a,b,c,d);
    if(strcmp(c,"等于")0)
    sum=change(d);
    //printf("%d",sum);
    while(3)
    {
    scanf("%s",fir);
    if(strcmp(fir,b)
    0)
    {
    scanf("%s",ad);
    if(strcmp(ad,"增加")0)
    {
    scanf("%s",num);
    sum=sum+change(num);
    }
    if(strcmp(ad,"减少")
    0)
    {
    scanf("%s",num);
    sum=sum-change(num);
    }
    }
    if(strcmp(fir,"看看")0)
    {
    scanf("%s",l);
    //printf("%s",dx(sum));
    }
    if(strcmp(fir,"如果")
    0)
    {
    scanf("%s %s %s %s %s %s %s %s %s",q,w,e,r,t,y,u,i,o);
    if(sum > 8)
    {dx(sum);printf(" %s",y);}
    else
    {printf("%s",o);break;}
    }
    }

    }
    基本目标

  • 相关阅读:
    JZ2440开发板开发环境搭建
    20180730-宿主机开发环境搭建
    20180319-双网卡电脑同时上内外网
    嵌入式ARM板子起步
    20180127-服务器开发环境搭建
    Pool多进程示例
    Python基础-day01
    解释型语言与编译型语言
    C 编译过程浅析
    博客奇谭
  • 原文地址:https://www.cnblogs.com/xjd123/p/12269896.html
Copyright © 2020-2023  润新知