在c++中编写一个程序实现进制转换。

[复制链接]
查看11 | 回复4 | 2012-12-4 15:43:46 | 显示全部楼层 |阅读模式
我说一下思路啊:假设你设置为8进制,输入数字为a=100,你先用a%8得到的是第一位,然后a=a/8;继续a%8得到第二位。。。一直到a/8为0的时候结束就行了...
回复

使用道具 举报

千问 | 2012-12-4 15:43:46 | 显示全部楼层
直接输出x%就是16进制的了,你用MFC做很简单,需要详细程序可以联系我...
回复

使用道具 举报

千问 | 2012-12-4 15:43:46 | 显示全部楼层
#include #include #include #include int main(int argc, char *argv[]){int oriBase,rstBase;std::string oriNum;static const char dig...
回复

使用道具 举报

千问 | 2012-12-4 15:43:46 | 显示全部楼层
#include#include #include #include char* DtoAn(double Res, char *Des, int DesType, int Precision){inti_integer;doubled_decimal;...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行