<?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';
}
?>
<?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';
}
?>
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';}?>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.