随笔分类 -  日常作业

摘要:链表合并 1 #include<iostream> 2 using namespace std; 3 struct LinkNode 4 { 5 int n; 6 LinkNode *next; 7 }; 8 LinkNode *CreateLinkList();//建立链表: 从标准输入读取数据, 阅读全文
posted @ 2017-12-31 10:15 TobicYAL 阅读(515) 评论(0) 推荐(0)
摘要:取石子问题 1 #include "stdlib.h" 2 #include <iostream> 3 #include<string> 4 #include <stdio.h> 5 using namespace std; 6 int step=0;//设定走的步数为step 7 int getm 阅读全文
posted @ 2017-12-22 22:03 TobicYAL 阅读(667) 评论(0) 推荐(0)
摘要:44:正整数的任意进制转换 44:正整数的任意进制转换 描述 将 p 进制 n 转换为 q 进制。p 和 q 的取值范围为【2,36】,其中,用到的数码按从小到大依次为:0,1,2,3,4,5,6,7,8,9,A,B,...,Z,不考虑小写字母。 注意:n 的长度不超过50位。 三个数之间用逗号间隔 阅读全文
posted @ 2017-12-22 17:33 TobicYAL 阅读(1683) 评论(0) 推荐(0)
摘要:布尔表达式 #include <iostream> #include <string.h> #include <memory> using namespace std; char str[1500], equ[1500]; char sign[1000]; int num[1000]; int s 阅读全文
posted @ 2017-12-10 19:48 TobicYAL 阅读(628) 评论(0) 推荐(0)
摘要:习题(15-1) 前缀表达式 (1010) 1 #include <iostream> 2 #include<cstring> 3 using namespace std; 4 char str[100][20]; //定义一个字符数组,以空格为界,每行存放一个符号或数 5 int strcount 阅读全文
posted @ 2017-11-26 14:51 TobicYAL 阅读(828) 评论(0) 推荐(0)
摘要:1069 浮点数加法 1 #include <iostream> 2 #include<stdlib.h> 3 #include<string> 4 using namespace std; 5 int main() 6 { 7 int point1, point2,point,len1,len2, 阅读全文
posted @ 2017-11-26 14:42 TobicYAL 阅读(962) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 using namespace std; 3 int queen[9],qcount=0; 4 void print() 5 { 6 for(int i=1;i<9;i++) 7 { 8 if (queen[i] == 1) 9 cout << "*" 阅读全文
posted @ 2017-11-16 21:10 TobicYAL 阅读(499) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include<string.h> 3 using namespace std; 4 int f(int i,char a,char b,char c) //定义一个函数为i个圆盘从a经过b全部套到a上的函数 5 { 6 if (i == 1) // 阅读全文
posted @ 2017-11-09 20:34 TobicYAL 阅读(389) 评论(0) 推荐(0)
摘要:1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int n, m,a,b,sumlin=0,summax=0; 6 cin >> n >> m; 7 int max[81][81],num[81]; 8 for(int l 阅读全文
posted @ 2017-11-04 10:41 TobicYAL 阅读(590) 评论(0) 推荐(0)
摘要:1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int N, n,flat=0; 6 cin >> N >> n; 7 int chess[50][50]; 8 int col1, line1,col2,line2; 9 阅读全文
posted @ 2017-11-03 17:23 TobicYAL 阅读(2291) 评论(0) 推荐(0)
摘要:例题(12.3) 忽略大小写的字符串比较 (1016) 1 #include <iostream> 2 using namespace std; 3 4 int main() 5 { 6 char ch1[80],ch2[80];int judge=0;//定义两个符号型数组来输入,设置一个判断数初 阅读全文
posted @ 2017-10-27 22:15 TobicYAL 阅读(682) 评论(0) 推荐(0)