上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 59 下一页
摘要: 题目: 7-63 查验身份证 (15 分) 一个合法的身份证号码由17位地区、日期编号和顺序编号加1位校验码组成。校验码的计算规则如下: 首先对前17位数字加权求和,权重分配为:{7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};然后将计算的和对11取模得到值Z;最后按照以下 阅读全文
posted @ 2019-05-06 00:32 cxc1357 阅读(2177) 评论(0) 推荐(0)
摘要: 我的程序: 1 #include<stdio.h> 2 #include<string.h> 3 #define N 50 4 char token[]= {'+','-','*','/','(',')'}; 5 6 int istoken(char c) { 7 int i; 8 for(i=0; 阅读全文
posted @ 2019-05-05 21:56 cxc1357 阅读(457) 评论(0) 推荐(0)
摘要: 要求:如果某数平方的末尾等于这个数,那么就称这个数为自守数思路:x为待求数,n为x的十进制位数,将x平方后对10^n求模,所得数等于x,则x为自守数 matlab程序: 1 %普通方法 2 tic; 3 index = 0; 4 data = zeros(1,100); 5 for i = 5:10 阅读全文
posted @ 2019-05-05 11:45 cxc1357 阅读(164) 评论(0) 推荐(0)
摘要: 程序: 1 #include <stdio.h> 2 #include <stdlib.h> 3 typedef struct TreeNode *Tree; 4 struct TreeNode{ 5 int v; 6 Tree Left,Right; 7 int flag; 8 }; 9 Tree 阅读全文
posted @ 2019-05-04 22:13 cxc1357 阅读(313) 评论(0) 推荐(0)
摘要: 程序: 1 #include <stdio.h> 2 #include <queue> 3 #define MaxTree 20 4 #define Null -1 5 using namespace std; 6 7 struct TreeNode { 8 int Left; 9 int Righ 阅读全文
posted @ 2019-05-04 18:24 cxc1357 阅读(229) 评论(0) 推荐(0)
摘要: 程序: 1 #include <stdio.h> 2 #define MaxTree 10 3 #define ElementType char 4 #define Tree int 5 #define Null -1 6 7 struct TreeNode { 8 ElementType Elem 阅读全文
posted @ 2019-05-04 15:46 cxc1357 阅读(251) 评论(0) 推荐(0)
摘要: 程序: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 typedef int ElementType; 5 typedef struct Node *PtrToNode; 6 struct Node { 7 ElementType Data; 8 Pt 阅读全文
posted @ 2019-05-04 12:14 cxc1357 阅读(1090) 评论(0) 推荐(0)
摘要: 模拟栈进出 方法一: 1 #include<stdio.h> 2 #define MAXSIZE 1000 3 4 typedef struct{ 5 int data[MAXSIZE]; 6 int top; 7 }SqStack; 8 9 int InitStack(SqStack *s){ 1 阅读全文
posted @ 2019-05-04 11:18 cxc1357 阅读(226) 评论(0) 推荐(0)
摘要: 循环队列(数组实现) 1 #include<stdio.h> 2 #include<stdlib.h> 3 typedef int ElementType; 4 typedef int Position; 5 typedef struct QNode * PtrToQNode; 6 struct Q 阅读全文
posted @ 2019-05-03 23:19 cxc1357 阅读(136) 评论(0) 推荐(0)
摘要: 顺序存储实现: 1 #include<stdio.h> 2 #include<stdlib.h> 3 4 typedef int Position; 5 typedef int ElementType; 6 typedef struct SNode *PtrToSNode; 7 struct SNo 阅读全文
posted @ 2019-05-03 22:38 cxc1357 阅读(186) 评论(0) 推荐(0)
上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 59 下一页