题解 1680: 数据结构-八进制数

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

使用%o直接输出八进制数

解题思路:在c语言里%o能直接输出八进制数注意事项:需要注意题目没有说明输入数的数目,在while循环中以EOF作为文件结束标志参考代码:#includeintmain(){intnum;while(scanf("%d",&num)!=EOF){printf("%o\n",

1680: 数据结构-八进制数

参考代码:#include#includeusingnamespacestd;intmain(){intnum;while(cin>>num){stacks;s.push(num);while(s.top()>=8){intn1=s.top();s.pop(

十进制转八进制数

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<malloc.h>typedef struct{    int data[100];    int top;}Lnod……

数据结构改进制

摘要:解题思路:注意事项:注意输入x的方式参考代码:#include<stdio.h>#include<iostream>#include<string.h>#include<stack>using nam……