合肥生活安徽新闻合肥交通合肥房产生活服务合肥教育合肥招聘合肥旅游文化艺术合肥美食合肥地图合肥社保合肥医院企业服务合肥法律

ECS 50程序代写、c/c++编程语言代做

时间:2024-01-26  来源:合肥网hfw.cc  作者:hfw.cc 我要纠错


HW1.2 - ECS 50  

What To Submit
changeOfBase.cpp
Prompt
Write a C++ program called changeOfBase.cpp that converts an integer number from one base to another. The program
should ask the user for the current base, the number in that current base, and the new base to be converted to. Valid
bases are between 2 and 36. Values of digits from 10 – 35 will be represented by the letters A – Z. You are guaranteed
that all values will be less than or equal to .
Input
Validity
All input will valid.
Values
Number To Convert
A number in a base between 2 and 36
Values from 10 - 35 will be represented by the letters A – Z
The letters may either be in lowercase or uppercase and may be a mix of either. Examples of valid input
AB12CD14
ab12cd14
aB12cD14
Number To Convert's Base
A value between 2 to 36
Base To Convert To
A value between 2 to 36
Program Requirements
Your program must compile without warnings when using the -Wall and -Werror options
Hints
Don't forget that you can add/subtract to from chars. For example 'a' + 1 is 'b' and 'B' + 2 is 'D'.
Examples
The examples provided here do not represent all possible input you can receive. Please make sure that you solve the
problem in the general case.
Example 1
Please enter the number's base: 10
Please enter the number: 25
Please enter the new base: 2
25 base 10 is 11001 base 2


Drop files here or click to upload.
Only the files listed below will be accepted—others will be ignored.
The combined size limit of all uploaded files is 5MB.
Example 2
Please enter the number's base: 6
Please enter the number: 405
Please enter the new base: 19
405 base 6 is 7G base 19
Example 3
Please enter the number's base: 24
Please enter the number: GIG
Please enter the new base: 10
GIG base 24 is 9664 base 10
如有需要,请加QQ:99515681 或WX:codehelp

扫一扫在手机打开当前页
  • 上一篇:CST3145代写、Java编程语言代做
  • 下一篇:代发EI检索会议 代发EI论文
  • 无相关信息
    合肥生活资讯

    合肥图文信息
    海信罗马假日洗衣机亮相AWE  复古美学与现代科技完美结合
    海信罗马假日洗衣机亮相AWE 复古美学与现代
    合肥机场巴士4号线
    合肥机场巴士4号线
    合肥机场巴士3号线
    合肥机场巴士3号线
    合肥机场巴士2号线
    合肥机场巴士2号线
    合肥机场巴士1号线
    合肥机场巴士1号线
    合肥轨道交通线路图
    合肥轨道交通线路图
    合肥地铁5号线 运营时刻表
    合肥地铁5号线 运营时刻表
    合肥地铁4号线 运营时刻表
    合肥地铁4号线 运营时刻表
  • 关于我们 | 打赏支持 | 广告服务 | 联系我们 | 网站地图 | 免责声明 | 帮助中心 | 友情链接 |

    Copyright © 2024 hfw.cc Inc. All Rights Reserved. 合肥网 版权所有
    ICP备06013414号-3 公安备 42010502001045