-
07-06-2014, 07:00 AM #91Junior Member
- Ngày tham gia
- Jul 2015
- Bài viết
- 1
sao mình viết theo bài mẫu của tia sáng bị lỗi này:
description resource path location type
resource leak: 'nhapdulieu' is never closed demo.java /javabasic/src/edu/ducky/basic line 10 java problem
-
07-06-2014, 07:00 AM #92Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>diemtb (move your mouse to reveal the content)</noscript>
diemtb (open)
diemtb (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote></blockquote></div>
</div>
</div>package hello;
import java.util.scanner;
public class scannerdemo {
public static void main(string[] args)
{
float diemtb;
string hoten;
int namsinh;
float diemtoan;
float diemly;
float diemhoa;
scanner a = new scanner(system.in);
system.out.print("nhap ho ten sinh vien: ");
hoten=a.nextline();
system.out.print("nhap nam sinh sv: ");
namsinh=a.nextint();
system.out.print("nhap diem toan cua sv: ");
diemtoan=a.nextfloat();
system.out.print("nhap diem ly cua sv: ");
diemly=a.nextfloat();
system.out.print("nhap diem hoa cua sv: ");
diemhoa=a.nextfloat();
diemtb=(diemtoan+diemly+diemhoa)/3;
if(diemtb>8.5)
{
system.out.println("sinh vien:"+hoten+"
nam sinh:"+namsinh+"
diem tb:"+diemtb+"
dat loai gioi");
}
else if(diemtb>7 && diemtb<8.5)
{
system.out.println("sinh vien:"+hoten+"
nam sinh:"+namsinh+"
diem tb:"+diemtb+"
dat loai kha");
}
else
{
system.out.println("sinh vien:"+hoten+"
nam sinh:"+namsinh+"
diem tb:"+diemtb+"
dat loai tb");
}
}
}
-
07-06-2014, 07:00 AM #93Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>baitap (move your mouse to reveal the content)</noscript>
baitap (open)
baitap (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
package hello;
import java.util.scanner;
public class scannerdemo {
public static void main(string[] args)
{
float diemtb;
string hoten;
int namsinh;
float diemtoan;
float diemly;
float diemhoa;
scanner a = new scanner(system.in);
system.out.print("nhap ho ten sinh vien: ");
hoten=a.nextline();
system.out.print("nhap nam sinh sv: ");
namsinh=a.nextint();
system.out.print("nhap diem toan cua sv: ");
diemtoan=a.nextfloat();
system.out.print("nhap diem ly cua sv: ");
diemly=a.nextfloat();
system.out.print("nhap diem hoa cua sv: ");
diemhoa=a.nextfloat();
diemtb=(diemtoan+diemly+diemhoa)/3;
if(diemtb>8.5)
{
system.out.println("sinh vien:"+hoten+"
nam sinh:"+namsinh+"
diem tb:"+diemtb+"
dat loai gioi");
}
else if(diemtb>7 && diemtb<8.5)
{
system.out.println("sinh vien:"+hoten+"
nam sinh:"+namsinh+"
diem tb:"+diemtb+"
dat loai kha");
}
else
{
system.out.println("sinh vien:"+hoten+"
nam sinh:"+namsinh+"
diem tb:"+diemtb+"
dat loai tb");
}
}
}
</blockquote></div>
</div>
</div>
-
07-06-2014, 07:00 AM #94Junior Member
- Ngày tham gia
- Apr 2015
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bai1 (move your mouse to reveal the content)</noscript>
bai1 (open)
bai1 (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package hello[/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]scannerdemo [/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]float diemtb[/color][color=#007700];[/color][color=#0000bb]string hoten[/color][color=#007700];[/color][color=#0000bb]int namsinh[/color][color=#007700];[/color][color=#0000bb]float diemtoan[/color][color=#007700];[/color][color=#0000bb]float diemly[/color][color=#007700];[/color][color=#0000bb]float diemhoa[/color][color=#007700];[/color][color=#0000bb]scanner a [/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].print([/color][color=#dd0000]"nhap ho ten sinh vien: "[/color][color=#007700]);[/color][color=#0000bb]hoten[/color][color=#007700]=[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap nam sinh sv: "[/color][color=#007700]);[/color][color=#0000bb]namsinh[/color][color=#007700]=[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap diem toan cua sv: "[/color][color=#007700]);[/color][color=#0000bb]diemtoan[/color][color=#007700]=[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap diem ly cua sv: "[/color][color=#007700]);[/color][color=#0000bb]diemly[/color][color=#007700]=[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap diem hoa cua sv: "[/color][color=#007700]);[/color][color=#0000bb]diemhoa[/color][color=#007700]=[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]diemtb[/color][color=#007700]=([/color][color=#0000bb]diemtoan[/color][color=#007700]+[/color][color=#0000bb]diemly[/color][color=#007700]+[/color][color=#0000bb]diemhoa[/color][color=#007700])/[/color][color=#0000bb]3[/color][color=#007700];if([/color][color=#0000bb]diemtb[/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]"sinh vien:"[/color][color=#007700]+[/color][color=#0000bb]hoten[/color][color=#007700]+[/color][color=#dd0000]" nam sinh:"[/color][color=#007700]+[/color][color=#0000bb]namsinh[/color][color=#007700]+[/color][color=#dd0000]" diem tb:"[/color][color=#007700]+[/color][color=#0000bb]diemtb[/color][color=#007700]+[/color][color=#dd0000]" dat loai gioi"[/color][color=#007700]);}else if([/color][color=#0000bb]diemtb[/color][color=#007700]>[/color][color=#0000bb]7 [/color][color=#007700]&& [/color][color=#0000bb]diemtb[/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]"sinh vien:"[/color][color=#007700]+[/color][color=#0000bb]hoten[/color][color=#007700]+[/color][color=#dd0000]" nam sinh:"[/color][color=#007700]+[/color][color=#0000bb]namsinh[/color][color=#007700]+[/color][color=#dd0000]" diem tb:"[/color][color=#007700]+[/color][color=#0000bb]diemtb[/color][color=#007700]+[/color][color=#dd0000]" dat loai kha"[/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]"sinh vien:"[/color][color=#007700]+[/color][color=#0000bb]hoten[/color][color=#007700]+[/color][color=#dd0000]" nam sinh:"[/color][color=#007700]+[/color][color=#0000bb]namsinh[/color][color=#007700]+[/color][color=#dd0000]" diem tb:"[/color][color=#007700]+[/color][color=#0000bb]diemtb[/color][color=#007700]+[/color][color=#dd0000]" dat loai tb"[/color][color=#007700]);}} }[/color]
</div>
</div>
-
07-20-2014, 07:00 AM #95Junior Member
- Ngày tham gia
- Mar 2015
- Bài viết
- 1
a xem cho e cái..sao chạy đoạn điều kiện nó sai rồi mà vẫn chạy tiếp phần xuatdulieu @@
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>baitap (move your mouse to reveal the content)</noscript>
baitap (open)
baitap (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
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]studyjavamain [/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]sinhvien sv [/color][color=#007700]= new [/color][color=#0000bb]sinhvien[/color][color=#007700](); [/color][color=#0000bb]sv[/color][color=#007700].[/color][color=#0000bb]nhapdulieu[/color][color=#007700](); [/color][color=#0000bb]sv[/color][color=#007700].[/color][color=#0000bb]dieukien[/color][color=#007700](); [/color][color=#0000bb]sv[/color][color=#007700].[/color][color=#0000bb]xuatdulieu[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]gc[/color][color=#007700](); }} class [/color][color=#0000bb]sinhvien [/color][color=#007700]{ public [/color][color=#0000bb]string hoten[/color][color=#007700]; public [/color][color=#0000bb]long nam[/color][color=#007700]; public [/color][color=#0000bb]float a[/color][color=#007700], [/color][color=#0000bb]b[/color][color=#007700], [/color][color=#0000bb]c[/color][color=#007700]; public [/color][color=#0000bb]void nhapdulieu[/color][color=#007700]() { [/color][color=#0000bb]scanner s [/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].print([/color][color=#dd0000]"nhập tên sinh viên: "[/color][color=#007700]); [/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]s[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập năm sinh: "[/color][color=#007700]); [/color][color=#0000bb]nam [/color][color=#007700]= [/color][color=#0000bb]s[/color][color=#007700].[/color][color=#0000bb]nextlong[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm toán: "[/color][color=#007700]); [/color][color=#0000bb]a [/color][color=#007700]= [/color][color=#0000bb]s[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm lý: "[/color][color=#007700]); [/color][color=#0000bb]b [/color][color=#007700]= [/color][color=#0000bb]s[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm hóa: "[/color][color=#007700]); [/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]s[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); } public [/color][color=#0000bb]void dieukien[/color][color=#007700]() { if (([/color][color=#0000bb]a [/color][color=#007700]< [/color][color=#0000bb]0[/color][color=#007700]) || ([/color][color=#0000bb]a [/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]"bạn đã nhập sai điểm toán vui lòng nhập lại!"[/color][color=#007700]); }else if (([/color][color=#0000bb]b [/color][color=#007700]< [/color][color=#0000bb]0[/color][color=#007700]) || ([/color][color=#0000bb]b [/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]"bạn đã nhập sai điểm lý vui lòng thử lại!"[/color][color=#007700]); }else if (([/color][color=#0000bb]c [/color][color=#007700]< [/color][color=#0000bb]0[/color][color=#007700]) || ([/color][color=#0000bb]c [/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]"bạn đã nhập sai điểm hóa vui lòng nhập lại!"[/color][color=#007700]); }else{ } } public [/color][color=#0000bb]void xuatdulieu[/color][color=#007700]() { [/color][color=#0000bb]float diemtrungbinh [/color][color=#007700]= (([/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700]) / [/color][color=#0000bb]3[/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]"sinh viên: " [/color][color=#007700]+ [/color][color=#0000bb]hoten[/color][color=#007700]); if ([/color][color=#0000bb]diemtrungbinh [/color][color=#007700]>= [/color][color=#0000bb]8.0[/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]"là sinh viên giỏi"[/color][color=#007700]); }else if (([/color][color=#0000bb]diemtrungbinh [/color][color=#007700]< [/color][color=#0000bb]8[/color][color=#007700]) && ([/color][color=#0000bb]diemtrungbinh [/color][color=#007700]>= [/color][color=#0000bb]6.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]"là sinh viên khá"[/color][color=#007700]); }else if (([/color][color=#0000bb]diemtrungbinh [/color][color=#007700]<[/color][color=#0000bb]6.5[/color][color=#007700]) && ([/color][color=#0000bb]diemtrungbinh [/color][color=#007700]>= [/color][color=#0000bb]5.0[/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]"là sinh viên trung bình"[/color][color=#007700]); }else if (([/color][color=#0000bb]diemtrungbinh [/color][color=#007700]< [/color][color=#0000bb]5[/color][color=#007700]) && ([/color][color=#0000bb]diemtrungbinh [/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]"là sinh viên yếu"[/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]"là sinh viên kém"[/color][color=#007700]); } }}[/color]
</div>
</div>
-
07-22-2014, 07:00 AM #96Junior Member
- Ngày tham gia
- Feb 2015
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bài tập (move your mouse to reveal the content)</noscript>
bài tập (open)
bài tập (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package javabasic[/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]nhapdata [/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 ten[/color][color=#007700];[/color][color=#0000bb]float tuoi[/color][color=#007700], [/color][color=#0000bb]toan[/color][color=#007700], [/color][color=#0000bb]ly[/color][color=#007700], [/color][color=#0000bb]hoa[/color][color=#007700], [/color][color=#0000bb]tb[/color][color=#007700];[/color][color=#0000bb]scanner kb [/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 tên học sinh: "[/color][color=#007700]);[/color][color=#0000bb]ten [/color][color=#007700]=[/color][color=#0000bb]kb[/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]"nhập vào năm sinh: "[/color][color=#007700]);[/color][color=#0000bb]tuoi [/color][color=#007700]=[/color][color=#0000bb]kb[/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 toán: "[/color][color=#007700]);[/color][color=#0000bb]toan[/color][color=#007700]=[/color][color=#0000bb]kb[/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 lý: "[/color][color=#007700]);[/color][color=#0000bb]ly[/color][color=#007700]=[/color][color=#0000bb]kb[/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]hoa[/color][color=#007700]=[/color][color=#0000bb]kb[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]tb[/color][color=#007700]= ([/color][color=#0000bb]hoa[/color][color=#007700]+[/color][color=#0000bb]ly[/color][color=#007700]+[/color][color=#0000bb]toan[/color][color=#007700])/[/color][color=#0000bb]3[/color][color=#007700];if( [/color][color=#0000bb]toan [/color][color=#007700]< [/color][color=#0000bb]0 [/color][color=#007700]|| [/color][color=#0000bb]ly [/color][color=#007700]< [/color][color=#0000bb]0 [/color][color=#007700]|| [/color][color=#0000bb]hoa [/color][color=#007700]< [/color][color=#0000bb]0[/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 sai điểm"[/color][color=#007700]);}if( [/color][color=#0000bb]tb [/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]"hoc sinh yếu"[/color][color=#007700]);}else if ([/color][color=#0000bb]tb[/color][color=#007700]>=[/color][color=#0000bb]5 [/color][color=#007700]&& [/color][color=#0000bb]tb [/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 binh "[/color][color=#007700]);}else if ([/color][color=#0000bb]tb[/color][color=#007700]>=[/color][color=#0000bb]7 [/color][color=#007700]&& [/color][color=#0000bb]tb[/color][color=#007700]<=[/color][color=#0000bb]8[/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]" hoc 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]" hoc sinh giỏi"[/color][color=#007700]);} }[/color]
</div>
</div>
-
08-08-2014, 07:00 AM #97Junior Member
- Ngày tham gia
- Aug 2014
- Đang ở
- 262 Gò Dưa, P.Tam Bình, Q.Thủ Đức
- Bài viết
- 0
Mã nguồn PHP:[color=#000000]
[/color][color=#007700]public class [/color][color=#0000bb]nhapxuat [/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 hoten[/color][color=#007700]; [/color][color=#0000bb]float t[/color][color=#007700], [/color][color=#0000bb]l[/color][color=#007700], [/color][color=#0000bb]h[/color][color=#007700], [/color][color=#0000bb]tb[/color][color=#007700]; [/color][color=#0000bb]int ns[/color][color=#007700]; [/color][color=#0000bb]scanner nhap [/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]"ten:"[/color][color=#007700]); [/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]nhap[/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]"nam sinh:"[/color][color=#007700]); [/color][color=#0000bb]ns [/color][color=#007700]= [/color][color=#0000bb]nhap[/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]"toan:"[/color][color=#007700]); [/color][color=#0000bb]t [/color][color=#007700]= [/color][color=#0000bb]nhap[/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]"ly:"[/color][color=#007700]); [/color][color=#0000bb]l [/color][color=#007700]= [/color][color=#0000bb]nhap[/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]"hoa:"[/color][color=#007700]); [/color][color=#0000bb]h [/color][color=#007700]= [/color][color=#0000bb]nhap[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); if (([/color][color=#0000bb]t [/color][color=#007700]< [/color][color=#0000bb]0[/color][color=#007700]) || ([/color][color=#0000bb]t [/color][color=#007700]> [/color][color=#0000bb]10[/color][color=#007700]) || ([/color][color=#0000bb]l [/color][color=#007700]< [/color][color=#0000bb]0[/color][color=#007700]) || ([/color][color=#0000bb]l [/color][color=#007700]> [/color][color=#0000bb]10[/color][color=#007700]) || ([/color][color=#0000bb]h [/color][color=#007700]< [/color][color=#0000bb]0[/color][color=#007700]) || ([/color][color=#0000bb]h [/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]"ban nhap diem sai! "[/color][color=#007700]); } else { [/color][color=#0000bb]tb [/color][color=#007700]= ([/color][color=#0000bb]t [/color][color=#007700]+ [/color][color=#0000bb]l [/color][color=#007700]+ [/color][color=#0000bb]h[/color][color=#007700]) / [/color][color=#0000bb]3[/color][color=#007700]; if ([/color][color=#0000bb]tb [/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]"ho ten: " [/color][color=#007700]+ [/color][color=#0000bb]hoten [/color][color=#007700]+ [/color][color=#dd0000]"
nam sinh:" [/color][color=#007700]+ [/color][color=#0000bb]ns [/color][color=#007700]+ [/color][color=#dd0000]"
diem 3 mon: toan: " [/color][color=#007700]+ [/color][color=#0000bb]t [/color][color=#007700]+ [/color][color=#dd0000]"
ly: " [/color][color=#007700]+ [/color][color=#0000bb]l [/color][color=#007700]+ [/color][color=#dd0000]"
hoa: " [/color][color=#007700]+ [/color][color=#0000bb]h [/color][color=#007700]+ [/color][color=#dd0000]"
diem trung binh:" [/color][color=#007700]+ [/color][color=#0000bb]tb [/color][color=#007700]+ [/color][color=#dd0000]"
dat hoc sinh gioi"[/color][color=#007700]); } if ([/color][color=#0000bb]tb [/color][color=#007700]> [/color][color=#0000bb]6.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]"ho ten: " [/color][color=#007700]+ [/color][color=#0000bb]hoten [/color][color=#007700]+ [/color][color=#dd0000]"
nam sinh:" [/color][color=#007700]+ [/color][color=#0000bb]ns [/color][color=#007700]+ [/color][color=#dd0000]"
diem 3 mon: toan: " [/color][color=#007700]+ [/color][color=#0000bb]t [/color][color=#007700]+ [/color][color=#dd0000]"
ly: " [/color][color=#007700]+ [/color][color=#0000bb]l [/color][color=#007700]+ [/color][color=#dd0000]"
hoa: " [/color][color=#007700]+ [/color][color=#0000bb]h [/color][color=#007700]+ [/color][color=#dd0000]"
diem trung binh:" [/color][color=#007700]+ [/color][color=#0000bb]tb [/color][color=#007700]+ [/color][color=#dd0000]"
dat hoc sinh kha"[/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]"ho ten: " [/color][color=#007700]+ [/color][color=#0000bb]hoten [/color][color=#007700]+ [/color][color=#dd0000]"
nam sinh:" [/color][color=#007700]+ [/color][color=#0000bb]ns [/color][color=#007700]+ [/color][color=#dd0000]"
diem 3 mon: toan: " [/color][color=#007700]+ [/color][color=#0000bb]t [/color][color=#007700]+ [/color][color=#dd0000]"
ly: " [/color][color=#007700]+ [/color][color=#0000bb]l [/color][color=#007700]+ [/color][color=#dd0000]"
hoa: " [/color][color=#007700]+ [/color][color=#0000bb]h [/color][color=#007700]+ [/color][color=#dd0000]"
diem trung binh:" [/color][color=#007700]+ [/color][color=#0000bb]tb [/color][color=#007700]+ [/color][color=#dd0000]"
dat hoc sinh trung binh"[/color][color=#007700]); } } }}[/color]
nhưng lúc chạy nó ghi điểm trung bình lại là dấu x.y chứ không phải x,y
-
08-24-2014, 07:00 AM #98Junior Member
- Ngày tham gia
- Mar 2015
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bài 1 (move your mouse to reveal the content)</noscript>
bài 1 (open)
bài 1 (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package baitapvenha[/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];[/color][color=#ff8000]/*** từ màn hình console, nhập dữ liệu của 1 sinh viên là họ và tên, năm sinh,* điểm toán, lý , hóa (kiểu số thực). dựa vào điểm trung bình 3 môn in ra đó là* học sinh giỏi, khá hay trung bình**/[/color][color=#007700]public class [/color][color=#0000bb]buoi7bai1 [/color][color=#007700]{ public [/color][color=#0000bb]string xeploai[/color][color=#007700]([/color][color=#0000bb]float dtoan[/color][color=#007700], [/color][color=#0000bb]float dly[/color][color=#007700], [/color][color=#0000bb]float dhoa[/color][color=#007700]) { [/color][color=#0000bb]string xloai [/color][color=#007700]= [/color][color=#dd0000]""[/color][color=#007700]; [/color][color=#0000bb]float dtoanb [/color][color=#007700]= ([/color][color=#0000bb]dtoan [/color][color=#007700]+ [/color][color=#0000bb]dly [/color][color=#007700]+ [/color][color=#0000bb]dhoa[/color][color=#007700]) / [/color][color=#0000bb]3[/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:\t"[/color][color=#007700]+[/color][color=#0000bb]dtoan[/color][color=#007700]+[/color][color=#dd0000]" điểm lý:\t"[/color][color=#007700]+[/color][color=#0000bb]dly[/color][color=#007700]+[/color][color=#dd0000]" điểm hóa:\t"[/color][color=#007700]+[/color][color=#0000bb]dhoa[/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 điểm: "[/color][color=#007700]+([/color][color=#0000bb]dtoan [/color][color=#007700]+ [/color][color=#0000bb]dly [/color][color=#007700]+ [/color][color=#0000bb]dhoa[/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 tb : "[/color][color=#007700]+[/color][color=#0000bb]dtoanb[/color][color=#007700]); if ([/color][color=#0000bb]dtoanb [/color][color=#007700]<= [/color][color=#0000bb]4.5[/color][color=#007700]) [/color][color=#0000bb]xloai [/color][color=#007700]+= [/color][color=#dd0000]"yếu"[/color][color=#007700]; else if ([/color][color=#0000bb]4.5 [/color][color=#007700]< [/color][color=#0000bb]dtoanb [/color][color=#007700]&& [/color][color=#0000bb]dtoanb [/color][color=#007700]< [/color][color=#0000bb]6.5[/color][color=#007700]) [/color][color=#0000bb]xloai [/color][color=#007700]+= [/color][color=#dd0000]"trung bình"[/color][color=#007700]; else if ([/color][color=#0000bb]6.5 [/color][color=#007700]<= [/color][color=#0000bb]dtoanb [/color][color=#007700]&& [/color][color=#0000bb]dtoanb [/color][color=#007700]< [/color][color=#0000bb]8.5[/color][color=#007700]) [/color][color=#0000bb]xloai [/color][color=#007700]+= [/color][color=#dd0000]"khá"[/color][color=#007700]; else [/color][color=#0000bb]xloai [/color][color=#007700]+= [/color][color=#dd0000]"giỏi"[/color][color=#007700]; return [/color][color=#0000bb]xloai[/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 ho[/color][color=#007700], [/color][color=#0000bb]tensv[/color][color=#007700]; [/color][color=#0000bb]int namsinh[/color][color=#007700]; [/color][color=#0000bb]float dtoan[/color][color=#007700], [/color][color=#0000bb]dly[/color][color=#007700], [/color][color=#0000bb]dhoa[/color][color=#007700]; [/color][color=#0000bb]buoi7bai1 test [/color][color=#007700]= new [/color][color=#0000bb]buoi7bai1[/color][color=#007700](); [/color][color=#0000bb]scanner sc [/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]"nhap thong tin sinh vien : "[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"ho :\t"[/color][color=#007700]); [/color][color=#0000bb]ho [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"ten sv :\t"[/color][color=#007700]); [/color][color=#0000bb]tensv [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); do { [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nam sinh :\t"[/color][color=#007700]); [/color][color=#0000bb]namsinh [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700](); if ([/color][color=#0000bb]namsinh [/color][color=#007700]< [/color][color=#0000bb]1000[/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]"chi nhap nam sinh cua nhung ban>=1000"[/color][color=#007700]); } while ([/color][color=#0000bb]namsinh [/color][color=#007700]< [/color][color=#0000bb]1000[/color][color=#007700]); do { [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"diem toan:\t"[/color][color=#007700]); [/color][color=#0000bb]dtoan [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"diem ly :\t"[/color][color=#007700]); [/color][color=#0000bb]dly [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"diem hoa :\t"[/color][color=#007700]); [/color][color=#0000bb]dhoa [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); if ([/color][color=#0000bb]0 [/color][color=#007700]> [/color][color=#0000bb]dtoan [/color][color=#007700]|| [/color][color=#0000bb]dtoan [/color][color=#007700]> [/color][color=#0000bb]10 [/color][color=#007700]|| [/color][color=#0000bb]0 [/color][color=#007700]> [/color][color=#0000bb]dly [/color][color=#007700]|| [/color][color=#0000bb]dly [/color][color=#007700]> [/color][color=#0000bb]10 [/color][color=#007700]|| [/color][color=#0000bb]0 [/color][color=#007700]> [/color][color=#0000bb]dhoa[/color][color=#007700]|| [/color][color=#0000bb]dhoa [/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]"nhap sai du lieu, yeu cau nhap lai!!!"[/color][color=#007700]); } } while ([/color][color=#0000bb]0 [/color][color=#007700]> [/color][color=#0000bb]dtoan [/color][color=#007700]|| [/color][color=#0000bb]dtoan [/color][color=#007700]> [/color][color=#0000bb]10 [/color][color=#007700]|| [/color][color=#0000bb]0 [/color][color=#007700]> [/color][color=#0000bb]dly [/color][color=#007700]|| [/color][color=#0000bb]dly [/color][color=#007700]> [/color][color=#0000bb]10 [/color][color=#007700]|| [/color][color=#0000bb]0 [/color][color=#007700]> [/color][color=#0000bb]dhoa[/color][color=#007700]|| [/color][color=#0000bb]dhoa [/color][color=#007700]> [/color][color=#0000bb]10[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nam sinh :\t"[/color][color=#007700]); [/color][color=#0000bb]namsinh [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"diem toan:\t"[/color][color=#007700]); [/color][color=#0000bb]dtoan [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"diem ly :\t"[/color][color=#007700]); [/color][color=#0000bb]dly [/color][color=#007700]= [/color][color=#0000bb]sc[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"diem hoa :\t"[/color][color=#007700]); [/color][color=#0000bb]dhoa [/color][color=#007700]= [/color][color=#0000bb]sc[/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]"sinh vien vua nhap : "[/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]"ho va ten: "[/color][color=#007700]+[/color][color=#0000bb]ho[/color][color=#007700]+[/color][color=#dd0000]" "[/color][color=#007700]+[/color][color=#0000bb]tensv[/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]namsinh[/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=#0000bb]test[/color][color=#007700].[/color][color=#0000bb]xeploai[/color][color=#007700]([/color][color=#0000bb]dtoan[/color][color=#007700], [/color][color=#0000bb]dly[/color][color=#007700], [/color][color=#0000bb]dhoa[/color][color=#007700])); }}[/color]
</div>
</div>
có test lỗi chỉ nhập năm sinh hơn 1000
điểm chỉ nhập từ 0 đến 10
-
08-24-2014, 07:00 AM #99Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Gửi bởi vickutetg
</div>
</div>
tớ có thấy lỗi đâu bạn @vickutetg ????
-
08-31-2014, 07:00 AM #100Junior Member
- Ngày tham gia
- Apr 2015
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bai tap (move your mouse to reveal the content)</noscript>
bai tap (open)
bai tap (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
mport java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700];public class [/color][color=#0000bb]kell1 [/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]scanner a[/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]string hoten[/color][color=#007700]; [/color][color=#0000bb]int namsinh[/color][color=#007700]; [/color][color=#0000bb]float toan[/color][color=#007700],[/color][color=#0000bb]ly[/color][color=#007700],[/color][color=#0000bb]hoa[/color][color=#007700]; [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap ten: "[/color][color=#007700]); [/color][color=#0000bb]hoten[/color][color=#007700]=[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap nam sinh "[/color][color=#007700]); [/color][color=#0000bb]namsinh[/color][color=#007700]=[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap diem toan"[/color][color=#007700]); [/color][color=#0000bb]toan[/color][color=#007700]=[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap diem ly"[/color][color=#007700]); [/color][color=#0000bb]ly[/color][color=#007700]=[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhap diem hoa"[/color][color=#007700]); [/color][color=#0000bb]hoa[/color][color=#007700]=[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#ff8000]// system.out.println("ho ten: "+hoten);// system.out.println("nam sinh "+namsinh);// system.out.println("diem toan "+toan);// system.out.println("diem ly "+ly);// system.out.println("diem hoa "+hoa); [/color][color=#0000bb]float dtb[/color][color=#007700]=(([/color][color=#0000bb]toan[/color][color=#007700]+[/color][color=#0000bb]ly[/color][color=#007700]+[/color][color=#0000bb]hoa[/color][color=#007700])/[/color][color=#0000bb]2[/color][color=#007700]); if([/color][color=#0000bb]dtb[/color][color=#007700]>=[/color][color=#0000bb]8[/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]"hoc sinh gioi"[/color][color=#007700]); else if([/color][color=#0000bb]dtb[/color][color=#007700]>[/color][color=#0000bb]6.5[/color][color=#007700]&&[/color][color=#0000bb]dtb[/color][color=#007700]<[/color][color=#0000bb]8[/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]"hoc sinh kha"[/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]"hoc sinh trung binh"[/color][color=#007700]); } }[/color]
</div>
</div>
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