06 2019 档案

摘要:#include <iostream>#include <cmath>using namespace std; class calc //类名:calc(计算器){private: int a,b; int p,m;public: calc(){} //不带参数的构造函数 void input(); 阅读全文
posted @ 2019-06-30 20:21 bobo哥 阅读(5643) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h>#include <stdlib.h>#include <iostream> using namespace std;const int MaxSize=8; typedef struct{ int stuno; char stuname[20]; int stu 阅读全文
posted @ 2019-06-30 19:18 bobo哥 阅读(2109) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <stdlib.h>using namespace std;const double PI=3.14159; //基类的定义class Point{private: int x,y;public: Point(int xx,int yy) { 阅读全文
posted @ 2019-06-30 16:52 bobo哥 阅读(813) 评论(0) 推荐(0) 编辑
摘要://求立方体的体积、表面积(c++) #include <iostream>#include <stdlib.h>#define COST 20using namespace std; class tiji{private: double length,width,height;public: ti 阅读全文
posted @ 2019-06-30 16:46 bobo哥 阅读(2644) 评论(0) 推荐(0) 编辑
摘要:/* Name : prime.c Author : zhangsan Version : Copyright : Your copyright notice Description : 键盘输入一个整数,判断是否是素数 */ #include <stdio.h> #include <stdlib. 阅读全文
posted @ 2019-06-30 07:27 bobo哥 阅读(4129) 评论(0) 推荐(0) 编辑
摘要:/* Name : p146.c Author : zhangsan Version : Copyright : Your copyright notice Description : 1+2+3+4+...+10, 教材p146 */ #include <stdio.h> #include <st 阅读全文
posted @ 2019-06-30 07:23 bobo哥 阅读(1498) 评论(0) 推荐(0) 编辑
摘要:/* Name : p144.c Author : zhangsan Version : Copyright : Your copyright notice Description : 1,2,3,4,5这五个数中作取3个组成互不相等的数,并算出有多少个 */ #include <stdio.h># 阅读全文
posted @ 2019-06-30 07:21 bobo哥 阅读(187) 评论(0) 推荐(0) 编辑
摘要:/* Name : test.c Author : asdfasdf Version : Copyright : Your copyright notice Description : 两个数比较,找出较大者,教材p143 */ #include <stdio.h>#include <stdlib. 阅读全文
posted @ 2019-06-30 07:18 bobo哥 阅读(347) 评论(0) 推荐(0) 编辑
摘要:/* Name : max4.c Author : zhangsan Version : Copyright : Your copyright notice Description : 四个数求最大值 */ #include <stdio.h>#include <stdlib.h>int max2( 阅读全文
posted @ 2019-06-30 07:16 bobo哥 阅读(1247) 评论(0) 推荐(0) 编辑
摘要:源程序如下: // // main.cpp // yiyuanercifangcheng // Created by duanqibo on 2019/6/29. // Copyright © 2019年 duanqibo. All rights reserved. // 本题是一个实现一元二次方程 阅读全文
posted @ 2019-06-29 18:25 bobo哥 阅读(260) 评论(0) 推荐(0) 编辑
摘要:// main.cpp // stack_quhao // Created by duanqibo on 2019/6/29. // Copyright © 2019年 duanqibo. All rights reserved. // 顺序栈的操作,整数进栈,取栈顶元素,栈内剩余元素 #inclu 阅读全文
posted @ 2019-06-29 17:59 bobo哥 阅读(3035) 评论(0) 推荐(0) 编辑
摘要:// // main.cpp // Graph_wuxiang // // Created by duanqibo on 2019/6/29. // Copyright © 2019年 duanqibo. All rights reserved. // 无向图的邻接矩阵存储,4个顶点、4条边,v0到 阅读全文
posted @ 2019-06-29 15:48 bobo哥 阅读(674) 评论(0) 推荐(0) 编辑
摘要:// // main.cpp // ruanjiankaifagongju3 // // Created by duanqibo on 2019/6/29. // Copyright © 2019年 duanqibo. All rights reserved. //2016年10月《软件开发工具》编 阅读全文
posted @ 2019-06-29 15:34 bobo哥 阅读(217) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <stdlib.h> #define N 10 //10是一个填空 int main() { int i,j,k,t,a[N]; printf("请输入5个整数:"); for(i=0;i<=N-1;i++) scanf("%d",&a[i]) 阅读全文
posted @ 2019-06-29 09:23 bobo哥 阅读(259) 评论(0) 推荐(0) 编辑
摘要:/* Name : max.c Author : duanqibo Version : Copyright : Your copyright notice Description : 输入三个整数,找出最大值 */ #include <stdio.h>#include <stdlib.h>int m 阅读全文
posted @ 2019-06-28 22:44 bobo哥 阅读(3460) 评论(0) 推荐(0) 编辑
摘要:/* Name : max_min.c Author : duanqibo Version : Copyright : Your copyright notice Description : 输入6个学生成绩,找出最高分和最低分,用函数实现 */ #include <stdio.h>#include 阅读全文
posted @ 2019-06-28 22:42 bobo哥 阅读(2091) 评论(0) 推荐(0) 编辑
摘要:/* Name : bubble_sort.c Author : duanqibo Version : Copyright : Your copyright notice Description : 输入6个成绩,冒泡排序,求平均分,再找出大于平均分的分数,最后将成绩中的偶数显示出来 */ #inc 阅读全文
posted @ 2019-06-28 22:28 bobo哥 阅读(329) 评论(0) 推荐(0) 编辑
摘要:程序功能:控制台输入车辆信息,将信息保存至数据库中 程序代码如下: BaseDao.java package DAO_dome.kehozuoye; import java.sql.Connection;import java.sql.DriverManager;import java.sql.Pr 阅读全文
posted @ 2019-06-28 16:26 bobo哥 阅读(2037) 评论(0) 推荐(0) 编辑
摘要:package ch01; import java.util.Scanner; public class upper { @SuppressWarnings("resource") public static void main(String[] args) { String s; System.o 阅读全文
posted @ 2019-06-28 16:05 bobo哥 阅读(4832) 评论(0) 推荐(0) 编辑
摘要:package ch01; import java.util.Scanner; public class string1 { public static void main(String[] args) { String s=" "; //String s1="0"; System.out.prin 阅读全文
posted @ 2019-06-28 16:04 bobo哥 阅读(5442) 评论(0) 推荐(0) 编辑
摘要:package ch01; import java.util.Scanner; public class integer1 { public static void main(String[] args) { float x=0; int i; Scanner r=new Scanner(Syste 阅读全文
posted @ 2019-06-28 16:01 bobo哥 阅读(3508) 评论(0) 推荐(0) 编辑
摘要:package ch01; import java.io.IOException; public class App1_1 { public static void main(String[] args) { char c=' '; System.out.print("请输入一个字符:"); try 阅读全文
posted @ 2019-06-28 15:59 bobo哥 阅读(1079) 评论(0) 推荐(0) 编辑
摘要:package com.duan;import java.awt.*;import javax.swing.*;import java.awt.event.*; public class Calculator extends JFrame implements ActionListener{ pri 阅读全文
posted @ 2019-06-28 15:50 bobo哥 阅读(704) 评论(0) 推荐(0) 编辑
摘要:要求: 1.请输入5个学生 2.按总分排序 3.按数学成绩排序 4.按语文成绩排序 5.按计算机成绩排序 6.单得成绩均大于85分的学生 7.将结果输出至文本文件 0.退出系统 package test_java; import java.util.ArrayList; import java.ut 阅读全文
posted @ 2019-06-28 15:33 bobo哥 阅读(1590) 评论(0) 推荐(0) 编辑
摘要://people为基类,student和graduate为子类,重载“==”运算符 //输入2个学生的信息:姓名、编号、身份证号、班级、专业 //输入1个研究生的信息:姓名、编号、身份证号、班级、专业、导师 //重载“==”,当两个学生的编号相同时,调用重载运算符,输出错误信息 源代码如下: #in 阅读全文
posted @ 2019-06-28 12:47 bobo哥 阅读(545) 评论(0) 推荐(0) 编辑
摘要:数组1 2 3 4 5 6 -1(输入-1结束),结果为:奇数位的数逆序,偶数位数不变,用链栈作为缓冲 源代码: //采用链栈,对数组1 2 3 4 5 6 -1(输入-1结束),结果为:奇数位的数逆序,偶数位数不变,即:5 2 3 4 1 6typedef int datatype;#includ 阅读全文
posted @ 2019-06-28 12:20 bobo哥 阅读(338) 评论(0) 推荐(0) 编辑
摘要: //将单链表中的元素逆序输出,利用栈作为缓冲区 typedef int datatype; #include <stdio.h> #include <stdlib.h> #include <malloc.h> #define NULL 0 #define maxsize 100 /*设栈的最大元 阅读全文
posted @ 2019-06-27 17:52 bobo哥 阅读(941) 评论(0) 推荐(0) 编辑
摘要://线性表的通用程序,c语言实现 #include <stdio.h> #include <stdlib.h> #define MaxSize 50 typedef char DataType; typedef struct node { DataType data[MaxSize]; int la 阅读全文
posted @ 2019-06-27 17:35 bobo哥 阅读(1523) 评论(0) 推荐(0) 编辑
摘要://设立一个队列Q,用于存放结点,以保证二叉树结点按照层次顺序从左到右进入队列。若二叉树bt非空,首先,//将根结点插入队列,然后,从队列中删除一个结点,访问该结点,并将该结点的孩子结点(如果有的话)插入//队列。#include <stdio.h>#include <stdlib.h> //定义二 阅读全文
posted @ 2019-06-27 13:57 bobo哥 阅读(1085) 评论(0) 推荐(0) 编辑
摘要://本程序有三个层次 //第一层(define_class.h):构造坐标点类,颜色和宽度的结构体,线段类 //第二层(function.h):对上一层声明的函数进行定义 //第三层(distance.cpp):用类定义对象并初始化对象,对结果进行测试 define_class.h #if!defi 阅读全文
posted @ 2019-06-27 13:32 bobo哥 阅读(5257) 评论(0) 推荐(0) 编辑
摘要:数据结构-双向链表的创建、插入和删除 双向链表是数据结构中重要的结构,也是线性结构中常用的数据结构,双向指针,方便用户从首结点开始沿指针链向后依次遍历每一个结点,结点的前驱和后继查找方便。 #include <stdio.h> #include <stdlib.h> //双向链表结点的定义 type 阅读全文
posted @ 2019-06-21 08:21 bobo哥 阅读(6755) 评论(0) 推荐(0) 编辑