What's wrong?
喂。
喂。 2018-01-23 00:27:23
0
9
1521

<?PHP

$chenji=rand(0,100);

if($chenji>=0 &&$chenji<60){

echo'No Passed';

}elseif ($chenji>=60 && $chenji<70)}

echo'Passed, have to work hard';

}elseif($chenji> ;=70 && $chenji<80){

echo'Very good';

}elseif($chenji>=80 && $chenji<90){

echo 'There is hope for Tsinghua University';

}elseif($chenji>=90 && $chgenji<100){

echo'You have no hope in this life';

}esle($chenji=100){

echo'There is no more hope';

}

?>

喂。
喂。

reply all(6)
A0专汽定制

<?php

$chengji=rand(0,100);

echo $chengji;

if($chengji<60){

echo 'Failed';

}elseif($chengji>=60&&$chengji<80){

echo 'Although passing, still need to work hard';

}elseif ($chengji>=90&&$chengji<100){

echo 'Continue to maintain excellent results';

}else{

echo 'Incorrect input';

}

?>


~多多~V504515363

If you write code like this, if it is at work, will it be indented at the minimum? {This can all be written incorrectly. Chinese and English semicolons do not distinguish. Else can also be incorrect. With your

attitude towards work, you should go home and farm


<?php

//Please enter your php code


$chenji=rand(0,100);

echo $ chenji ;

if($chenji >= 0 && $chenji < 60){

echo 'failed' ;

}elseif ($chenji >= 60 && $chenji < 70){

echo 'You passed the test, you have to work hard' ;

}elseif($chenji >= 70 && $chenji < 80){

echo 'Very good' ;

}elseif($chenji >= 80 && $chenji < 90){

echo 'There is hope for Tsinghua University';

}elseif($chenji >=90 && $chgenji < 100){

echo 'You have no hope in this life' ;

}else {

echo 'There is no more hope' ;

}

?>



        我不是你的肖奈

$chengji=rand(0,100);
echo $chengji;
if($chengji<60){
echo 'failed';
}else if ($chengji<70) {
echo 'You passed, you have to work hard';
}else if($chengji<80){
echo 'Very good';
}else if($chengji<90){
echo 'There is hope for going to Tsinghua University';
}else if($chengji<100){
echo 'You have no hope in this life';
}else{
echo 'There is even less hope ';
}

        我不是你的肖奈

Version:1.0 StartHTML:0000000128 EndHTML:0000005061 StartFragment:0000000128 EndFragment:0000005061 SourceURL:about:blank$chengji=rand(0,100);
echo $chengji;
if($chengji<60){
echo 'failed';
}else if ($chengji< 70){
echo 'You passed, you have to work hard';
}else if($chengji<80){
echo 'Very good';
}else if($chengji<90){
echo 'There is hope for going to Tsinghua University';
}else if($chengji<100){
echo 'You have no hope in this life';
}else{
echo 'Nothing more I hope';
}

森

<?PHP


##$chenji=rand(0,100);

if($chenji>=0 &&$chenji<60){

echo 'Failed';

}elseif ($chenji>=60 && $chenji<70){

echo 'Passed, work hard';

}elseif($chenji>=70 && $chenji<80){

echo 'Very good';

}elseif($chenji>=80 && $chenji<90 ){

echo 'There is hope for Tsinghua University';

}elseif($chenji>=90 && $chgenji<100){

echo 'You have no hope in this life ';

}else{

echo 'There is no hope anymore';

}

?>



  • reply The last else is written incorrectly, and there is no need to add conditions. elseif ($chenji&gt;=60 && $chenji&lt;70)} The following brackets are written backwards. ;Switch to English
    author 2018-01-23 10:53:41
  • reply $chengji=rand(0,100); echo $chengji; if($chengji&lt;60){ echo 'failed'; }else if ($chengji&lt;70){ echo 'You passed the test, you have to work hard'; }else if($chengji&lt;80){ echo 'very good'; }else if($chengji&lt;90){ echo 'There is hope for Tsinghua University'; }else if($chengji&lt;100){ echo 'You have no hope in this life'; }else{ echo 'There is no more hope'; }
phpcn_u99126

1, many Chinese semicolons need to be changed to English, only English symbols can be used in programming

2, the last else word is written wrong

3, after the last else is If you directly connect the curly brackets, you are not allowed to add parentheses to add conditions after it. It does not comply with the grammatical specifications

4. There is no need to add conditions for the last else here. If none of the above are met, it can only be $chenji =100.

  • reply The point of the question is that 92 will fail under random circumstances. No matter any number, it will fail...
    喂。 author 2018-01-23 01:17:50
  • reply Just replace $chenji=rand(0,100); with $chenji = 92; and see what the result is! The last variable name of $chgenji&lt;100 is typed incorrectly.
    nike author 2018-01-23 01:25:56
  • reply Still the same. How could this happen?
    喂。 author 2018-01-23 18:29:38
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template