C++
fancyZT
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
我的语雀——指路(网络编程、算法刷题)
后来一直没有在csdn上记录,用的是语雀,放一些读研后的学习记录吧,语雀的搜索和界面设置没有OneNote做的好,OneNote就是不能插入代码,看代码很难受。 网络编程 算法刷题 找时间再好好总结。 ...原创 2022-05-19 11:14:20 · 477 阅读 · 0 评论 -
PAT-Basic刷题1041-1050
1041 考试座位号 #include<iostream> #include<string> using namespace std; int main(){ string stu[1005][2]; string s1,s2; int m,n,t; cin>>n; for(int i=0;i<n;i++){ cin>>s1>>t>>s2; stu[t][0]原创 2020-06-25 13:22:59 · 269 阅读 · 0 评论 -
PAT-Basic刷题1031-1040
1031 查验身份证 #include<iostream> using namespace std; int a[17]={7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2}; int b[11]={1, 0, 10 ,9 ,8 ,7 ,6, 5, 4, 3 ,2}; string s; bool isTrue(){ int sum=0; for(int i=0;i<17;i++){ if(s[i]<'0'||s[i]>'9原创 2020-06-24 16:04:02 · 224 阅读 · 0 评论 -
PAT-Basic刷题1021-1030
1021 个位数统计 #include<iostream> #include<algorithm> #include<vector> using namespace std; int main(){ string s; int a[10]={0}; cin>>s; for(int i=0;i<s.length();i++) a[s[i]-'0']++; for(int i=0;i<10;i++原创 2020-06-13 14:59:07 · 319 阅读 · 0 评论 -
PAT-Basic刷题1011-1020
1011 A+B 和 C #include<iostream> #include<cstdio> using namespace std; int main(void){ int n; cin>>n; for(int i=1;i<=n;i++){ long long int a,b,c; scanf("%lld%lld%lld",&a,&b,&c); printf("Ca原创 2020-06-13 10:06:02 · 274 阅读 · 0 评论 -
PAT-Basic刷题1000-1010
1001 害死人不偿命的(3n+1)猜想 #include <stdio.h> int Callatz(int N){ int count=0; while(N!=1){ if(N%2==1){ N=(3*N+1)/2; count++; } else if(N%2==0){ N=N/2; count++; }原创 2020-06-11 10:19:32 · 279 阅读 · 0 评论 -
谭浩强C++(第三版)(4)-12-14章
12-1 point.h #include<iostream> using namespace std; class Point{ public: Point(float x=0,float y=0); void setPoint(float,float); float getX() const {return x;} float getY() cons...原创 2020-02-17 11:51:08 · 507 阅读 · 0 评论 -
谭浩强C++(第三版)(3)-9-11章
9-3 #include<iostream> using namespace std; class Date{ public: //有默认参数的构造函数不能重载,会引起歧义 Date(int=1,int=1,int=2005); void display(); private: int month; int year; int day; ...原创 2020-02-13 22:17:05 · 602 阅读 · 0 评论 -
谭浩强C++(第三版)(2)-6-8章
6-1原创 2020-02-12 22:10:22 · 251 阅读 · 0 评论 -
谭浩强C++(第三版)(1)-3-5章
3-15 #include <iostream> using namespace std; int main() { int m,n,p,r,temp; cout<<"Please enter m:";cin>>m; cout<<endl<<"Please enter n:";cin>>n; p=...原创 2020-02-10 11:03:15 · 1032 阅读 · 0 评论 -
C++ primer Plus(第六版)课后编程题
C++ primer Plus(第六版)课后编程题 第二章 2-1 #include<iostream> using namespace std; int main(){ cout<<"My name is Xin Tang,and I come from Zhangzhou,Henan."<<endl; } 2-2 #include<...原创 2019-12-28 09:48:52 · 493 阅读 · 0 评论
分享