Program
Daria·Saira
这个作者很懒,什么都没留下…
展开
-
190404_Py_example6 (the area of a circle)
Python_example 6program_1 calculate the area of a circlemethod_1_principle method_2_principleconclusion :1.math method compare to computer mind2.use func perf_counter to analyze the code’...原创 2019-04-04 15:24:38 · 221 阅读 · 0 评论 -
Struct_chapter2.2_堆栈
Struct_chapter2.2_堆栈concept引例中缀 : a+bc前缀 : +abc(+) a+*bc --> a+b*c(*) b*c中缀 : a+ b*c - d/e后缀 : abc*+de/-(*) bc* --> b*c(+) abc*+ --> a+b*c(/) de/ --> d/e(-) abc*+de/- -->...原创 2019-04-20 12:33:23 · 222 阅读 · 0 评论 -
RUA!ERROR!
Error不可怕解决就是啦(づ ̄3 ̄)づ╭❤~Error 1一个超级经典的错误!overflow栈不空就遍历输出(但是仅遍历是不会导致栈空的所以是典型的while(true)error) push (s,3634); push (s,90); //typical error //hhhhhhhhh(now I'm the girl had the overflow e...原创 2019-04-20 16:21:37 · 147 阅读 · 0 评论 -
C_Polynomial multiplication and addition_190509
Polynomial multiplication and addition – realize by Cnotice : complement the codemathematical modeldata structstruct polynode{ int coef;//系数 int expon;//指数 struct polynode *link;//point to ...原创 2019-05-09 21:02:23 · 228 阅读 · 0 评论 -
struct_chapter2.3_queue_190508
struct_chapter2.3_queue2.3.1 sequential queueconceptqueue入队:addQ出队:deleteQfeatures先来先服务先进先出(FIFO)ADTrealization of sequential queuespecial statusCircular queuekey point :...原创 2019-05-09 22:46:02 · 266 阅读 · 0 评论 -
Struct_chapter3_Tree
Struct_chapter3_Tree3.1 tree and the expression of treeconcept of treean excellent struct to expresses hierarchical relationship(层次关系)more efficienctSearching0x01 static searchingnotice :...原创 2019-05-14 21:43:26 · 409 阅读 · 0 评论 -
C_test8_190511
C_test8_190511question 1题目内容:你的程序要读入一行文本,其中以空格分隔为若干个单词,以‘.’结束。你要输出这行文本中每个单词的长度。这里的单词与语言无关,可以包括各种符号,比如“it’s”算一个单词,长度为4。注意,行中可能出现连续的空格。输入格式:输入在一行中给出一行文本,以‘.’结束,结尾的句号不能计算在最后一个单词的长度内。输出格式:在一行中输出这...原创 2019-05-12 14:06:52 · 94 阅读 · 0 评论 -
C_Euclidean algorithm
最简分式(10分)题目内容:分数可以表示为“分子/分母”的形式。编写一个程序,要求用户输入一个分数,然后将其约分为最简分式。最简分式是指分子和分母不具有可以约分的成分了。如6/12可以被约分为1/2。当分子大于分母时,不需要表达为整数又分数的形式,即11/8还是11/8;而当分子分母相等时,仍然表达为1/1的分数形式。输入格式:输入在一行中给出一个分数,分子和分母中间以斜杠“/”分隔,如:...原创 2019-05-22 15:50:34 · 120 阅读 · 0 评论 -
02
#include<stdio.h>#include<stdlib.h>typedef struct{ int maxsum; int first; int end;}form;form online(int list[],int n){ form out; int nowsum=0; int i=0; int maxsum=-1; //two f...原创 2019-05-26 17:40:33 · 94 阅读 · 0 评论 -
C_190418_array
C_190418_arrayerror : variably modified at file scopehelp text 1help text 21、#define LISTEN_NUM 10 /*The MAX Number Of Users*/2、const int LISTEN_NUM = 10;/*UserProfile Struct, to store us...原创 2019-04-18 18:16:23 · 212 阅读 · 0 评论 -
Program/Algorithm_practice 1.2
Program/Algorithm_practice 1.2利用 online/dynamic array 解决子列最大和问题key pointscan the array by ordernowsum saves the current answermaxsum always saving the max valueand when nowsum is minus ,drop i...原创 2019-04-08 19:59:35 · 139 阅读 · 0 评论 -
Python_190414_test5
Python_190414_test5program1#计算任意个输入数字的乘积def cmul(*a):#notice the use of changeable value s=1 for i in a: s*=i return s #notice the space signs the layer of the program prin...原创 2019-04-14 19:27:44 · 1182 阅读 · 0 评论 -
C_190412_test5
#include<stdio.h>#include<math.h>//program_1/*我们认为2是第一个素数,3是第二个素数,5是第三个素数,依次类推。现在,给定两个整数n和m,0<n<=m<=200,你的程序要计算第n个素数到第m个素数之间所有的素数的和,包括第n个素数和第m个素数。*/// 2 3 5 7 9//input 2...原创 2019-04-12 15:17:31 · 161 阅读 · 0 评论 -
Prog/Algo_practice_190401
Program/Algorithm_practice 1利用 二分法/dynamic array 实现子列最大和问题//FUNC1//output is only three states : left(A);mid(B);right(C)int max3(int A, int B, int C){ return A>B?A>C?A:C:B>C?B:C;}//find...原创 2019-04-03 17:13:52 · 137 阅读 · 0 评论 -
Py_190417_example_5
get the changeable inputs#prog1 example_5#func 1 get inputdef getinput(): nums=[]#define a viod list iput=input("please input numbers (enter for exit):")#for the firstinput while i...原创 2019-04-17 13:15:08 · 109 阅读 · 0 评论 -
Python_Combined data type_practice190603
思路:暂存当前最大词(为比较字符串大小)及其频率(为比较频率)先比较频率,仅当频率相同时比较字符串大小#coding:utf-8#printice 3 data cleaning and frequency statistics '''输出长度大于2且最多的单词。...原创 2019-06-03 20:57:41 · 320 阅读 · 0 评论