11 2021 档案

摘要:#include <iostream> using namespace std; int main( ) { char str[] = "test cerr:"; cerr << "Test success!!!" << str << endl; } 阅读全文
posted @ 2021-11-18 20:53 一只狗狗 阅读(43) 评论(2) 推荐(1) 编辑
摘要:#include "stdio.h" #define OK 1 #define ERROR 0 #define Stacksize 100 typedef int status; typedef int elemtype; //元素为整型 #define SIZE 100 typedef struc 阅读全文
posted @ 2021-11-18 20:51 一只狗狗 阅读(109) 评论(0) 推荐(1) 编辑
摘要:int DFS_AM(AMgraph G,int v) { cout<<v; visited[v]=true; for(w=0;w<G.vexnum;w++) if((G.arcs[v][w]!=0)&&(!visited[w])) DFS_AM(G,w); return 0; } 阅读全文
posted @ 2021-11-18 20:48 一只狗狗 阅读(29) 评论(0) 推荐(1) 编辑
摘要://1、设置程序的环境,将下列环境设置代码补充完整。 #include "stdio.h" #include "string.h" #define OK 1 #define ERROR 0 typedef int status; typedef struct stu{ //添加图书信息结构 char 阅读全文
posted @ 2021-11-18 20:47 一只狗狗 阅读(118) 评论(0) 推荐(1) 编辑
摘要://1、 根据下列程序环境的设置,补充完整二叉树的二叉链表结点结构体的定义。 #include "stdio.h" #define OK 1 #define ERROR 0 typedef int status; //下面是二叉树相关的定义 #define MAX 20 typedef char T 阅读全文
posted @ 2021-11-18 20:42 一只狗狗 阅读(198) 评论(0) 推荐(1) 编辑
摘要:#include "stdio.h" #include "stdlib.h" #define MAXSIZE 15 //顺序表最大长度 #define ERROR 0 #define OK 1 typedef struct Seqlist { int data[MAXSIZE]; int lengt 阅读全文
posted @ 2021-11-18 20:39 一只狗狗 阅读(70) 评论(0) 推荐(1) 编辑
摘要:#include "stdio.h" #define OK 1 #define ERROR 0 typedef int status; typedef int elemtype; //元素为整型 typedef struct Node{ /* 定义单链表结点类型 */ elemtype data; 阅读全文
posted @ 2021-11-18 20:28 一只狗狗 阅读(37) 评论(0) 推荐(0) 编辑
摘要:#include "stdio.h" #include "string.h" #define OK 1 #define ERROR 0 typedef struct student{ //定义学生结构体 int num; //学号 char name[10]; //姓名 float score; / 阅读全文
posted @ 2021-11-18 20:27 一只狗狗 阅读(190) 评论(0) 推荐(0) 编辑
摘要:#include "stdio.h"#define OK 1#define ERROR 0#define SIZE 10typedef int status;typedef int elemtype; //元素为整型 typedef struct { //队列的顺序存储结构 elemtype *ba 阅读全文
posted @ 2021-11-18 20:23 一只狗狗 阅读(163) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h> #define ERROR 0 #define OK 1 typedef int Status; typedef int ElemType; // 顺序表的存储结构 #define MAXSIZE 100 //顺序表可能达到的最大长度 typedef struct 阅读全文
posted @ 2021-11-18 20:21 一只狗狗 阅读(111) 评论(0) 推荐(0) 编辑
摘要:#include<stdio.h> int main(){ int ans=1; for(int i=1;i<=10;i++){ ans = ans*2; } printf("%d",ans) ; return 0;} 分析:i<=10,表示2的10次方。 阅读全文
posted @ 2021-11-18 20:19 一只狗狗 阅读(100) 评论(0) 推荐(0) 编辑
摘要:学习笔记: 点击查看代码 void ShortestPath_Floyd(AMGraph G) {//用Floyd算法求有向网G中各对顶点i和j之间的最短路径 for(int i=0;i<G.vexnum;i++)//初始各对结点之间已知路径及距离 for(int j=0;j<G.vexnum;j+ 阅读全文
posted @ 2021-11-16 09:08 一只狗狗 阅读(51) 评论(0) 推荐(0) 编辑
摘要:首先,明确几个要点: 1.每个类中必有成员变量(或局部变量)和构造方法以及该类的其他行为方法 2.java是面向对象的编程语言,即:先创建类,然后在main方法中创建对象,然后根据对象调用方法。 以下是我学习过程中的代码: 前提要点分析: 学生与课程之间的关系就是: 一个课程对应多个学生,一个学生对 阅读全文
posted @ 2021-11-15 22:24 一只狗狗 阅读(202) 评论(0) 推荐(0) 编辑
摘要:public class BMI { private String name; private int age; private double weight; private double height; // public static final double KIL = 0.45359237; 阅读全文
posted @ 2021-11-15 09:01 一只狗狗 阅读(717) 评论(0) 推荐(1) 编辑
摘要:试题 A :空间 本题总分:5分 【问题描述】 小蓝准备用256MB的内存空间开一个数组,数组的每个元素都是32位二进制整数,如果不考虑程序 占用的空间和维护内存需要的辅助空间,请问256MB的空间可以存储多少个32位二进制整数? 【答案提交】 这是一道结果填空题,你只需要算出结果后提交即可。本题的 阅读全文
posted @ 2021-11-10 23:03 一只狗狗 阅读(2817) 评论(0) 推荐(0) 编辑
摘要:方法一: C语言代码: int gcd(int m,int n){ int temp1,temp2; if(m<n){//两数交换 temp1 = m; m=n; n=temp1; } while(n!=0){ temp2 = n; n = m % n; m = temp2; } return m; 阅读全文
posted @ 2021-11-08 13:06 一只狗狗 阅读(59) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示