zoukankan      html  css  js  c++  java
  • 面向对象程序设计寒假作业2

    面向对象程序设计寒假作业2

    这个作业属于哪个课程 2020面向对象程序(福州大学 - 数学与计算机科学学院)
    这个作业要求在哪里 [面向对象程序设计寒假作业2]
    这个作业的目标 1.继续完成编程题。2.新建一个github仓库,并把作业推送到该仓库。3.发布博客。
    作业正文 编程题
    其他参考文献 因为写的不多,就只是问了别人

    include<stdio.h>

    include

    include<string.h>

    using namespace std;
    int main()
    {
    char s[10];
    scanf("整数 钱包 等于");
    cin>>s;
    if(strcmp(s,"一")0)
    {
    cout<<1<<endl;
    }
    if(strcmp(s,"二")
    0)
    {
    cout<<2<<endl;
    }
    if(strcmp(s,"三")0)
    {
    cout<<3<<endl;
    }
    if(strcmp(s,"四")
    0)
    {
    cout<<4<<endl;
    }
    if(strcmp(s,"五")0)
    {
    cout<<5<<endl;
    }
    if(strcmp(s,"六")
    0)
    {
    cout<<6<<endl;
    }
    if(strcmp(s,"七")0)
    {
    cout<<7<<endl;
    }
    if(strcmp(s,"八")
    0)
    {
    cout<<8<<endl;
    }
    if(strcmp(s,"九")0)
    {
    cout<<9<<endl;
    }
    if(strcmp(s,"零")
    0)
    {
    cout<<0<<endl;
    }
    return 0;
    }
    我发现我之前写的不对,因为C语言不可以识别汉字,所以我问了别人这个怎么转换,最后我终于知道了怎么把汉字转化为数字,但是来不及了(讲真我本来打算放弃了)我真的不太会,但是感觉作业不交态度不太行,我就小小的试了一下,C++真没有学过,尽力了,接下来的课程我会好好听课的,加油!

  • 相关阅读:
    redis分布式锁原理
    设置linux源
    linux 设置固定ip 并且解决ping www.baidu.com不通问题
    java内存模型
    Messenger和MVVM中的View Services
    MVVMLight
    MVVMLight
    MvvmLight
    MVVM 事件转命令1
    Mvvm简介
  • 原文地址:https://www.cnblogs.com/liao0/p/12267363.html
Copyright © 2011-2022 走看看