![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Code repository
文章平均质量分 53
林zZ
这个作者很懒,什么都没留下…
展开
-
(MNIST_data_nn)手写数字识别__一层神经网络__代码
引入库:import tensorflow as tfimport input_datafrom time import timeprint(tf.__version__)# tensorflow 2.2.0导入数据:mnist = input_data.read_data_sets('MNIST_data/', one_hot=True)超参数设置:# 训练参数train_epochs = 20batch_size = 50 # 批大小total_batch = i原创 2020-09-01 00:30:27 · 224 阅读 · 0 评论 -
图的创建 有向图 插入 删除 邻接矩阵 邻接表
有向图的创建,插入删除顶点,插入删除弧,打印邻接矩阵和邻接表,查看顶点下标。注:先分结构介绍,最后是完整代码和运行结果。弧结点↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓typedef struct ArcNode{ int AdjVertex;//邻接点下标 struct ArcNode *Next;}ArcNode;顶点域↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓...原创 2019-11-28 13:03:48 · 2922 阅读 · 3 评论 -
无向图 图的创建 输出邻接表 邻接矩阵
#include <stdio.h>#include <stdlib.h>#define MAXIMUM 100typedef struct EdgeNode//弧(vi,vj)结点{ int vertexnum;//弧尾序号j struct EdgeNode *nextEdge;}EdgeNode;typedef struct VertexNode//...原创 2019-11-27 15:26:47 · 2808 阅读 · 4 评论 -
单链表创建学生成绩表 输出学生姓名成绩及班级平均分
建立单链表(有头尾指针)用于存放学生某门课程成绩(整型);输出链表中的所有数据和平均成绩,并且能够在指定的位置插入或删除指定的某学生的成绩。要求:数据个数和数据从键盘输入。#include <stdio.h>#include <stdlib.h>int Listlength=0;//链表长度,不包含头结点//int *Q=&Listlength;typ...原创 2019-11-26 12:57:00 · 5064 阅读 · 0 评论 -
随机小写字母矩阵
#include <stdio.h>#include <stdlib.h>#include <time.h>void fun (int m,int n,char (*p)[100]);int main(void){ int m,n; char array[100][100]; scanf("%d %d",&m,&n); sr...原创 2019-11-24 10:03:08 · 158 阅读 · 0 评论 -
指针数组 学生姓名成绩排序
#include <stdio.h>#include <stdlib.h>typedef struct Node{ char Name[15]; int Score;}Node;void Sort(Node **chart,int n);int main(void){ int n,i; Node *chart[50]; printf("请输入班级...原创 2019-11-23 18:26:07 · 1978 阅读 · 0 评论 -
数组 冒泡排序
严格意义不算是直接插入,是先插入再排序#include<stdio.h>#define MAXIMUM 100int count=0;//计数器void fun(int *array,int num);//函数声明int main(void){ int a[MAXIMUM],num; int i; while(1) { printf("请输入一个整数,输入...原创 2019-11-23 10:47:03 · 388 阅读 · 0 评论 -
输入大写字母 输出菱形
#include<stdio.h>int main(){ char n,letter='A'; int j,space; scanf("%c",&n); if(letter<'A'||n>'Z') { printf("ERROR!"); return 1; } space=n-'A';//行前空格数 for(letter='A'...原创 2019-11-15 22:48:30 · 2286 阅读 · 0 评论 -
链表 直接插入排序法
题目:输入 10 个已经从小到大排列好的数字,并用链表存储,再输入一个数,将其插入到 10 个数之间,使得新序列仍然满足从小到大的排序。(必须用链表)#include <stdio.h>#include <stdlib.h>typedef int ElemType;typedef struct Node//定义结点{ int data; struct Nod...原创 2019-12-09 16:40:58 · 547 阅读 · 0 评论 -
链表 直接插入法
.输入 10 个已经从小到大排列好的数字,并用链表存储,再输入一个数,将其插入到 10 个数之间,使得新序列仍然满足从小到大的排序。(必须用链表)#include <stdio.h>#include <stdlib.h>typedef int ElemType;typedef struct Node//定义结点{ int data; struct Node ...原创 2019-11-10 21:58:19 · 685 阅读 · 0 评论 -
报数1,2,3,每报3的出局,用链表输出结果
#include <stdio.h>#include <stdlib.h>#define ERROR 0#define OK 1typedef int Status;int LIST_length=2;typedef struct Node{ struct Node *next; int data;}Node;Status InitList_Sq...原创 2019-11-09 14:23:55 · 303 阅读 · 0 评论 -
字符串的逆置
从键盘上输入一个字符串,使输入的字符串反序存放,在屏幕上显示输出(经过处理后)的字符串非递归方法#include <stdio.h>int main(){ int i,j,temp; char str[100],upend[100]; printf("请输入一个字符串\n"); gets(str);//输入字符串 printf("\n"); for(i=0;...原创 2019-11-07 10:11:23 · 772 阅读 · 0 评论 -
完数
一个数如果恰好等于它的因子之和,这个数就称カ“完数”。例如,6的因子为1,2,3.而6=1十2十3,因此6是“完数”。編程序找出1000之内的所有完数,并按下面格式輸出其因子:6 its factors are 1,2,3.#include <stdio.h>#define MAXSIZE 1000void fun(int n,int arr[]){ int i,sum=0...原创 2019-11-07 10:11:54 · 871 阅读 · 0 评论