-
06-13-2016, 07:00 AM #121Junior Member
- Ngày tham gia
- Dec 2014
- Bài viết
- 0
em nộp bài ạ
Mã nguồn PHP:[color=#000000]
import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700]; public class [/color][color=#0000bb]_finalbaitap [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]) {[/color][color=#0000bb]string name[/color][color=#007700];[/color][color=#0000bb]int age[/color][color=#007700];[/color][color=#0000bb]float math[/color][color=#007700];[/color][color=#0000bb]float literary[/color][color=#007700];[/color][color=#0000bb]float english[/color][color=#007700];[/color][color=#0000bb]float i[/color][color=#007700];[/color][color=#ff8000]// điểm chỉ từ 0 --> 10 [/color][color=#0000bb]scanner data [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"họ và tên: "[/color][color=#007700]);[/color][color=#0000bb]name [/color][color=#007700]= [/color][color=#0000bb]data[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"năm sinh: "[/color][color=#007700]);[/color][color=#0000bb]age [/color][color=#007700]= [/color][color=#0000bb]data[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"
"[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm toán: "[/color][color=#007700]);[/color][color=#0000bb]math [/color][color=#007700]= [/color][color=#0000bb]data[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm văn học: "[/color][color=#007700]);[/color][color=#0000bb]literary [/color][color=#007700]= [/color][color=#0000bb]data[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm anh văn :"[/color][color=#007700]);[/color][color=#0000bb]english [/color][color=#007700]= [/color][color=#0000bb]data[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"
"[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"
"[/color][color=#007700]); [/color][color=#0000bb]i [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700]+[/color][color=#0000bb]literary[/color][color=#007700]+[/color][color=#0000bb]english[/color][color=#007700];[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"tổng số điểm : " [/color][color=#007700]+ [/color][color=#0000bb]i[/color][color=#007700]);if([/color][color=#0000bb]i [/color][color=#007700]>= [/color][color=#0000bb]3.8 [/color][color=#007700]&& [/color][color=#0000bb]i [/color][color=#007700]< [/color][color=#0000bb]5[/color][color=#007700]) {[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"bạn học sinh trung bình !"[/color][color=#007700]);}else if([/color][color=#0000bb]i [/color][color=#007700]>= [/color][color=#0000bb]5 [/color][color=#007700]&& [/color][color=#0000bb]i [/color][color=#007700]< [/color][color=#0000bb]8.5[/color][color=#007700]) {[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"bạn học sinh khá !"[/color][color=#007700]);}else {[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"bạn học sinh giỏi !"[/color][color=#007700]);}}}[/color]
-
06-28-2016, 07:00 AM #122Junior Member
- Ngày tham gia
- Feb 2015
- Bài viết
- 0
Gửi bởi tiasangmoi92
-
06-28-2016, 07:00 AM #123Junior Member
- Ngày tham gia
- May 2014
- Bài viết
- 1
Mã nguồn PHP:[color=#000000]
package studyandshare[/color][color=#007700].[/color][color=#0000bb]vn[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700];public class [/color][color=#0000bb]baitoannhapxuatdulieu [/color][color=#007700]{ public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]) {[/color][color=#ff8000]// todo auto-generated method stub[/color][color=#0000bb]string hovaten[/color][color=#007700];[/color][color=#0000bb]int namsinh[/color][color=#007700];[/color][color=#0000bb]float diemtoan[/color][color=#007700], [/color][color=#0000bb]diemly[/color][color=#007700], [/color][color=#0000bb]diemhoa[/color][color=#007700]; [/color][color=#0000bb]scanner sv [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhập vào họ và tên"[/color][color=#007700]);[/color][color=#0000bb]hovaten [/color][color=#007700]= [/color][color=#0000bb]sv[/color][color=#007700].[/color][color=#0000bb]next[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhập vào năm sinh"[/color][color=#007700]);[/color][color=#0000bb]namsinh [/color][color=#007700]= [/color][color=#0000bb]sv[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhập vào điểm toán?"[/color][color=#007700]);[/color][color=#0000bb]diemtoan [/color][color=#007700]= [/color][color=#0000bb]sv[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhập điểm lý? "[/color][color=#007700]);[/color][color=#0000bb]diemly [/color][color=#007700]= [/color][color=#0000bb]sv[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhập vào điểm hóa? "[/color][color=#007700]);[/color][color=#0000bb]diemhoa [/color][color=#007700]= [/color][color=#0000bb]sv[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]float td [/color][color=#007700]= [/color][color=#0000bb]diemly [/color][color=#007700]+ [/color][color=#0000bb]diemtoan [/color][color=#007700]+ [/color][color=#0000bb]diemhoa[/color][color=#007700];if(([/color][color=#0000bb]td [/color][color=#007700]>[/color][color=#0000bb]0[/color][color=#007700]) &&([/color][color=#0000bb]td [/color][color=#007700]< [/color][color=#0000bb]3.5[/color][color=#007700])){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"học sinh yếu"[/color][color=#007700]);}else if (([/color][color=#0000bb]td [/color][color=#007700]>= [/color][color=#0000bb]3.5[/color][color=#007700]) && ([/color][color=#0000bb]td [/color][color=#007700]<[/color][color=#0000bb]7[/color][color=#007700])){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"học sinh trung bình"[/color][color=#007700]);}else if (([/color][color=#0000bb]td [/color][color=#007700]>=[/color][color=#0000bb]7[/color][color=#007700])&&([/color][color=#0000bb]td [/color][color=#007700]<=[/color][color=#0000bb]8.5[/color][color=#007700])){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"học sinh khá"[/color][color=#007700]);}else if (([/color][color=#0000bb]td [/color][color=#007700]> [/color][color=#0000bb]8.5[/color][color=#007700]) && ([/color][color=#0000bb]td [/color][color=#007700]<=[/color][color=#0000bb]10[/color][color=#007700])){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"học sinh giỏi"[/color][color=#007700]);}else{[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"bạn đã nhập sai định dạng hoặc nhập quá giá trị"[/color][color=#007700]);}} }[/color]
-
10-05-2016, 10:41 AM #124Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
THanks chủ thớt
Mình dốt về java lắm nên giờ phải mò học từ đâu, cám ơn bác đã chia sẻ các thông tin hữu ích, em thấy mò cũng dễ hơn
Khu dự án Diamond Alnata Plus phát triển bởi Gamuda Land thiết kế hợp lý nằm trung tâm thông gió tự nhiên. Diamond Alnata Plus Tân Phú thiết kế hợp lý sống đích thực ngay giữa trung tâm. Căn hộ cách...
Khu dự án Diamond Alnata Plus giáp trung tâm