上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 54 下一页
摘要: 源程序: #include <stdio.h>void sum_data(unsigned int num,int *data,int *sum){ unsigned int count; int sum_temp; sum_temp=0; for(count=0;count<num;count++ 阅读全文
posted @ 2020-12-14 21:21 bobo哥 阅读(388) 评论(0) 推荐(0)
摘要: 源程序: #include <stdio.h>#define N 5int main(){ int score[N]; //={89,67,80,85,79}; int i,j,max,min,temp; for(i=0;i<N;i++) { printf("请输入第 %d 学生的成绩:",i+1) 阅读全文
posted @ 2020-12-14 20:45 bobo哥 阅读(878) 评论(0) 推荐(0)
摘要: #include <iostream>using namespace std;class Test{private: static int x; //静态变量 int n;public: Test(){}; Test(int a,int b) { x=a; n=b; } static int fun 阅读全文
posted @ 2020-12-13 11:44 bobo哥 阅读(155) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>using namespace std;//shape类中有纯虚函数,所以shape类是抽象类,抽象类定义的对象//也是抽象的,只能用指针对象,不能用普通对象,更不能用普通对象实例化class shape{public: virtual double 阅读全文
posted @ 2020-12-13 10:59 bobo哥 阅读(189) 评论(0) 推荐(0)
摘要: 源程序: /*//1、二维矩阵原样输出//2、转90度输出//3、每行最后增加一个元素,变成正方形矩阵输出//4、求矩阵中的最大值和最小值//5、求主对角线和副对角线之和*/#include <stdio.h>int main(){ int Numbers[4][3]={1,1,1, 2,4,8, 阅读全文
posted @ 2020-12-13 10:09 bobo哥 阅读(1653) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <string.h>int main(){ float score; int temp; char grade[5]; printf("please input the score;\n"); scanf_s("%f", &score); tem 阅读全文
posted @ 2020-12-10 22:50 bobo哥 阅读(2211) 评论(0) 推荐(0)
摘要: abstract class Geometr //定义抽象类,几何图形{ public abstract double getArea(); //抽象函数,得到底面积} class Pillar //柱子类 { Geometr bottom; //柱子的底面 double height; //柱子的 阅读全文
posted @ 2020-12-08 21:24 bobo哥 阅读(473) 评论(0) 推荐(0)
摘要: 源程序: //*******************************//程序:冒泡排序//描述:用外层趟数和内层交换数完成//输入:用数组输入//输出:用显示器输出//其他://*******************************#include <iostream>#includ 阅读全文
posted @ 2020-12-08 20:40 bobo哥 阅读(1361) 评论(0) 推荐(0)
摘要: #include <iostream>#include <Cmath>using namespace std;class Pixel;class Test{public: void printX(Pixel p);}; class Pixel{private: int x,y;public: Pix 阅读全文
posted @ 2020-11-29 20:44 bobo哥 阅读(127) 评论(0) 推荐(0)
摘要: #include <iostream>using namespace std;class CType{private: int radius; int width;public: CType():radius(16),width(185){}; CType(int r,int w):radius(r 阅读全文
posted @ 2020-11-29 19:56 bobo哥 阅读(90) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 54 下一页