![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
openjudge
scy1106
这个作者很懒,什么都没留下…
展开
-
openjudge/ 1.4编程基础之逻辑表达式与条件分支 1-5
01:判断数正负#include<iostream>using namespace std;int main(){ int n; scanf("%d",&n); if(n>0) cout<<"positive"<<endl; else if(n==0) cout<<"zero&quo原创 2018-07-24 19:37:09 · 2644 阅读 · 0 评论 -
openjudge / 1.2编程基础之变量定义、赋值及转换
01:整型数据类型存储空间大小#include<bits/stdc++.h>using namespace std;int main(){ int x; short y; cout<<sizeof(x)<<" "<<sizeof(y)<<endl; return 0;}02:浮点型数据类型存储空间大小#i...原创 2018-07-23 21:20:05 · 1188 阅读 · 0 评论 -
openjudge / 1.7编程基础之字符串 06
06:合法 C 标识符#include<bits/stdc++.h>using namespace std; const int N = 21; char S[N]; int main(){ gets(S); int n = strlen(S); bool flag = 1; if (!(S[0]=='_' || isalpha(S[0]))) fla...原创 2018-07-25 20:24:16 · 733 阅读 · 0 评论 -
openjudge / 1.7编程基础之字符串 34:回文子串
34:回文子串#include<bits/stdc++.h>using namespace std;bool pd(string s){ int n = s.size(); int i=0, j=n-1; while (i<j) if (s[i]==s[j]) { i++; j--; } else return fal...原创 2018-07-25 20:25:44 · 604 阅读 · 0 评论 -
openjudge/ 1.3编程基础之算术表达式与顺序执行
01:A+B问题#include<iostream>using namespace std;int main(){ int a,b; cin>>a>>b; cout<<a+b;}02:计算(a+b)*c的值#include<iostream>using namespace std;in...原创 2018-11-25 09:44:41 · 2164 阅读 · 0 评论 -
openjudge/ 1.5编程基础之循环控制
01:求平均年龄#include <iostream>#include <iomanip>#include <cmath>using namespace std;int main(){ int n, age, i; double avg, sum=0; cin >> n; for (i=0; i<...原创 2018-12-30 17:49:20 · 8708 阅读 · 0 评论 -
openjudge 1.10编程基础之简单排序
hello!我还是我,不一样的烟火!今天,我来给大家继续发布openjudge上的题目!(不喜勿喷!本人依旧是个菜鸡!)好了,进入正题,大家一起看标题!!!!!!!【滑稽】【滑稽】【滑稽】废话不多说!直接上图片???哈哈,被骗了吧!不玩了!真的上代码!01#include<bits/stdc++.h>using namespace std;struct c...原创 2019-04-07 18:19:28 · 2285 阅读 · 3 评论