- 博客(6)
- 资源 (1)
- 收藏
- 关注
原创 正整数转换成字符串
#include using namespace std;class STR{ int num; char s[15];public: STR(int x) { num =x; } void itoa(); void print() { cout<<"n="<<num<<endl; cout<<"string = "<<s<
2009-02-28 21:49:00 995
原创 整数降序排列
#include using namespace std;class Num{ int n; int a[5];public: Num(int x = 0) { for(int i =0;i<5;i++) { a[i]=0; } n = x; } void descrease(); void show() {
2009-02-28 13:42:00 951
原创 二维数组旋转90度输出
#include using namespace std;int main(){ int b[8][8] = {{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4}}; int m = 4; for(int i =0;i<m;i++) { for(int j=0;j<m;j++) { cout<<b[i][j]<
2009-02-28 12:46:00 3949 1
原创 二维数组转单向链表
#include using namespace std;class MATRIX{ int m; int sum; int a[40][40];public: MATRIX(int x[][40],int k) { m = k; for(int i = 0;i<m;i++) { for(int j =0;j<m;j++)
2009-02-26 00:02:00 1319
原创 c++ 程序设计实践指导1.2
统计指针数组中每个元素出现的个数 #include using namespace std;class ARP{ int m; int* pa; //array *P int* ps; // sum of same;public: ARP(int x[],int size) { m = size; pa = new int[m];
2009-02-25 21:05:00 619
原创 c++ 程序设计实践指导1.1
1.1程序改写要求以数组为结构的程序改写为以指针为数据结构 解: //2009 Tonee hannsoft@163.com#include using namespace std;class ARP{ int m; int* p; public: ARP(int x[],int size) { m = size; p =
2009-02-24 22:55:00 788 2
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人