- 博客(5)
- 收藏
- 关注
原创 问题 H: 部分A+B (15)
#include<stdio.h> #include<cmath> int main(void){ long long int A=0,B=0; int DA=0,DB=0; float countA=0,countB=0; while(scanf("%lld %d %lld %d",&A,&DA,&B,&DB) != EOF){ ...
2019-06-25 21:28:24
238
原创 哪里有错误?
#include<iostream> #include<string.h> #include<math.h> using namespace std; #define N 1000 int main(void){ int a[N],n=0; while(scanf("%d",&n) != EOF){ double A[5]={0},k1=0,k3...
2019-06-13 21:55:15
131
原创 C语言逻辑运算符: && 和 ||
&& 和 || 是逻辑运算符,分别是逻辑与(&&)和逻辑或(||) && (逻辑与):(三种) ① 当逻辑与左边为false(假),则不再进行逻辑与右边的判断,结果为false(假) ② 当逻辑与左边为true(真)则进行右边判断,右边为false(假),结果为false(假) ③ 当逻辑与左边为true(真)则进行右边判断,右边也为true(真)...
2019-04-09 21:53:45
1494
原创 读取字符串中的数字
读取字符串中的数字,可以用 str[i]-‘0’ 的方法 例: 特殊乘法 #include<stdio.h> #include<string.h> int main() { int i,j,len1,len2,sum; char str1[11],str2[11]; while(scanf("%s %s",str1,str2) != EOF){ sum = 0; len1...
2019-04-09 21:33:09
2547
原创 printf小记
#include <stdio.h> #include <iostream> struct { int num; char name[10]; char sex; char job; union { int clas; char position[10]; }category; }s[100];...
2019-04-06 22:23:21
103
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人