#include <stdio.h>
int main()
{
//定义三位数num,个位数sd,十位数td,百位数hd
int num, sd, td, hd;
//循环所有三位数
for(num=100;num<1000;num=num+1)
{
//获取三位数字num百位上的数字
hd =num/100;
//获取三位数字num十位上的数字
td =(num-hd*100)/10;
//获取三位数字num个位上的数字
sd =num-hd*100-td*10;
//水仙花数的条件是什么?
if(num=hd*hd*hd+td*td*td+sd*sd*sd)
{
printf("水仙花数字:%d\n", num);
}
}
return 0;
}
#include <stdio.h>
double n;
double sum;
double num;
double f(double n,double num)
{
if(n<=3.0,5<=num<23)
{
sum=13;
}
else if(n<=3.0,0<=num<5||23<=num<24)
{
sum=13+2*3;
}
else if(n>3.0,0<=num<5||23<=num<24)
{
sum=13+2*n+(n-3)*2.3;
}
else(n>3.0,5<=num<23);
{
sum=13+(n-3)*2.3;
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
'If' 判断哪里,是绝对'==',而不是一个赋值'='。
即: if(num'=='........)