⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 digit.cpp

📁 PHS通信测试程序
💻 CPP
字号:
// digit.cpp : Defines the entry point for the console application.
//

#include <iostream>
#include <cstdio>
#include "digit_conv.h"
using namespace std;
using namespace digit;

int main(int argc, char* argv[])
{
	printf("Hello World!\n");

	unsigned value; 
	string bstr, ostr, dstr, hstr, str33;
	while(true){
		cout<<"Pls input:";
		cin>>value;
		bstr = DToB(value);
		ostr= DToO(value);
		dstr = DToA(value, 10);
		hstr = DToH(value);
		str33= DToA(value, 33);
		printf("BIN = %s; OCT = %s;  DEC = %s; HEX = %s, 33= %s\n", bstr.c_str(), ostr.c_str(),
			dstr.c_str(), hstr.c_str(), str33.c_str());
		printf("From Bin = %d, from Oct = %d, from Dec = %d, from Hex = %d, from 33 = %d\n", BToD(bstr),
			OToD(ostr), AToD(dstr, 10), HToD(hstr), AToD(str33, 33));
	}

	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -