asort 꼭 쓰란 소리는 안했음
sort계열 함수 쓰란 소리를 했지ㅇㅇ
뭐 asort도 sort계열에 들어가니 저거도 맞다고 본다만ㅇㅇ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | <!DOCTYPE html> <html> <head> <title></title> </head> <body> <table border="1"> <tr> <th align="center" width="120">성명</th> <th align="center" width="50">국어</th> <th align="center" width="50">영어</th> <th align="center" width="50">수학</th> <th align="center" width="100">총점</th> <th align="center" width="80">평균</th> <th align="center" width="50">석차</th> <?php $name=$_REQUEST[name]; $sub1=$_REQUEST[sub1]; $sub2=$_REQUEST[sub2]; $sub3=$_REQUEST[sub3]; $n=array(); array_push($n, $_REQUEST[name]); $r=array(); $avg=array(); $all=array(); for ($i=0; $i < count($name); $i++) { $avg[$i]=($sub1[$i]+$sub2[$i]+$sub3[$i])/3; $all[$i]=$sub1[$i]+$sub2[$i]+$sub3[$i]; } $ts=array(); array_push($ts, $all); array_push($n, $all); rsort($ts[0]); reset($ts[0]); for ($i=0; $i < count($all); $i++) { for ($j=0; $j < count($all); $j++) { if($ts[0][$j]==$n[1][$i]) array_push($r, $j+1); } } for ($i=0; $i < count($name); $i++) { echo"<tr>"; echo "<td width='120'>",$n[0][$i],"</td>"; echo "<td width='50'>$sub1[$i]</td>"; echo "<td width='50'>$sub2[$i]</td>"; echo "<td width='50'>$sub3[$i]</td>"; echo "<td width='100'>",$n[1][$i],"</td>"; echo "<td width='80'>$avg[$i]</td>"; echo "<td width='50'>$r[$i]</td>"; echo "</tr>"; } ?> </tr></table> </body> </html> |
이게 내가 만든 코드.
sort계열 함수인 rsort함수 사용했고, 10인분 이상도 견딘다.
고로 코드 존나 잘봤음ㄳㄳ
그리고 난 고졸들 그다지 무시 안 한다.
어차피 실력주의 세상인데 실력 짱짱이면 장땡이지
실력 충만해도 안 되면 걍 해외가면 되는거고ㅇㅇ
근데 아둔이는 집안이 흙수저냐? 한양대씩이나 들가놓고 왜 중퇴함?
나도 흙수저지만 아둔이만큼 좆고시절 머가리 존나 좋아서 한양대 합격했다면
(참고로 난 11년 수능 67866662였다. 용케도 지잡에서 과탑대열 들가있다 시발;;)
집안에서 국가장학재단에서 하는 학자금대출 받는 한이 있더라도 보낼 기세던데........
아, 그러면 아둔이는 금수저인가보네. 흙수저 취급해서 미안하다.
진성 흙수저인 나는 불쏘시개만도 못한 땔감이나 되야지 시발 씨발 쒸이이이이발
되야->돼야 (되어 = 돼임) [리듬 맞춤법 봇♬]