emmm....这样?
a=0;b=1;c=2
if a > b:
print('a>b')
if ac>bc:
print('ac>bc')
else:
print('ac<=bc')
else:
print('a<=b')
a大于b的情况下判断ac bc谁大谁小你判断c的正负零不就好了
/*
2010 2011
18612 18623
5 10
12 29
q
Press any key to continue
*/
#include <stdio.h>
#include <math.h>
int main() {
double n,nactor,sum,item;
int a,b;
while(scanf("%d%d",&a,&b) == 2) {
nactor = 1;
n = 1;
sum = 0;
item = 1;
while(sum <= a) {
sum += item;
++n;
nactor += 1/n;
item = 1/nactor;
}
printf("%g ",n);
while(sum <= b) {
sum += item;
++n;
nactor += 1/n;
item = 1/nactor;
}
printf("%g\n",n);
}
return 0;
}
这编程还能证明不等式?mark一下,等一个大牛来解答
emmm,没明白意思