蓝桥杯+进制转换+STL stack的使用
来源:互联网 发布:如何卸载mac的app 编辑:程序博客网 时间:2024/05/16 05:52
#include<iostream>#include<stdio.h>#include<stdlib.h>#include<string.h>#include<algorithm>#include<stack>using namespace std;char Ch[17]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};int main(){ stack<int>s; int n=0,a=0; cin>>a; if(a==0)//系统漏洞,a==0的情况 { cout<<"0"<<endl; return 0; } while(a!=0) { s.push(a%16); a=a/16; } while(!s.empty()) { if(s.top()>=10) { cout<<Ch[s.top()]; } else cout<<s.top(); s.pop(); } return 0;}
0 0
- 蓝桥杯+进制转换+STL stack的使用
- STL stack的使用
- STL 栈stack的使用
- stack STL 中栈的简单使用
- C++ STL中stack/queue的使用
- STL----stack 和queue的使用
- 【day0414 C++】STL stack 栈的使用
- C++ STL stack queue 的使用函数
- stl stack使用...
- STL stack简单使用
- stl 的stack函数
- STL的stack
- STL stack 的实现
- 我的日记之stl的stack的使用方式
- STL容器使用DEMO-stack
- c++ stl栈stack使用
- STL学习之stack使用
- 【STL】stack要点及使用
- json格式
- 【C#、SQL】学习与错误记录(一)
- HDOJ-最大子矩阵(二维dp)
- imregionalmax
- c++ template(4)基本技巧
- 蓝桥杯+进制转换+STL stack的使用
- c++ template笔记(3)非类型模板参数nontype template parameters
- win7+Cygwin+Eclipse搭建Hadoop开发环境
- jenkins配置邮件报错:501 mail from address must be same as authorization user
- 进程线程及堆栈关系的总结
- 通过GET方式传递 数据到服务器
- c++ template笔记(2)模板类
- 深度学习介绍(三)LeNet
- 【进攻Android】Android、Bootstrap、Python