题目描述
写出一个程序,接受一个十六进制的数,输出该数值的十进制表示。(多组同时输入 )
输入描述:
输入一个十六进制的数值字符串。
输出描述:
输出该数值的十进制字符串。
示例1
输入
复制
0xA
输出
复制
10
#include <iostream>
#include <string.h>
#include <math.h>
#include <vector>
using namespace std;
int main()
{
char psz[100] = {
0};
while(cin>>psz)
{
int nLen = strlen(psz);
int nIndex = 0;
vector<char> vecpz;
for (int i = 0; i < nLen; i++