-
07-05-2014, 07:00 AM #111Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bai01 (move your mouse to reveal the content)</noscript>
bai01 (open)
bai01 (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
[/color][color=#007700]public class [/color][color=#0000bb]demo [/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]int a[/color][color=#007700], [/color][color=#0000bb]b[/color][color=#007700], [/color][color=#0000bb]c[/color][color=#007700];[/color][color=#0000bb]a [/color][color=#007700]= [/color][color=#0000bb]9[/color][color=#007700];[/color][color=#0000bb]b [/color][color=#007700]= [/color][color=#0000bb]7[/color][color=#007700]; [/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]15[/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]"phan nguyen cua a, b, c khi chia cho 2 lan luoc la:"[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700]/[/color][color=#0000bb]2[/color][color=#007700]+[/color][color=#dd0000]" "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]/[/color][color=#0000bb]2[/color][color=#007700]+[/color][color=#dd0000]" "[/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700]/[/color][color=#0000bb]2[/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]"phan du cua a, b, c khi chia cho 3 lan luoc la:"[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]3[/color][color=#007700]+[/color][color=#dd0000]" "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]%[/color][color=#0000bb]3[/color][color=#007700]+[/color][color=#dd0000]" "[/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]"gia tri cua ba bien a, b, c khi tang len 1:"[/color][color=#007700]+(++[/color][color=#0000bb]a[/color][color=#007700]) + [/color][color=#dd0000]" "[/color][color=#007700]+(++[/color][color=#0000bb]b[/color][color=#007700]) +[/color][color=#dd0000]" "[/color][color=#007700]+(++[/color][color=#0000bb]c[/color][color=#007700])); }}[/color]
</div>
</div>
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bai02 (move your mouse to reveal the content)</noscript>
bai02 (open)
bai02 (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
[/color][color=#007700]public class [/color][color=#0000bb]demo [/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 a[/color][color=#007700], [/color][color=#0000bb]b[/color][color=#007700], [/color][color=#0000bb]c[/color][color=#007700], [/color][color=#0000bb]x[/color][color=#007700];[/color][color=#0000bb]a [/color][color=#007700]= [/color][color=#0000bb]3[/color][color=#007700];[/color][color=#0000bb]b [/color][color=#007700]= [/color][color=#0000bb]4[/color][color=#007700]; [/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]5[/color][color=#007700];[/color][color=#0000bb]x [/color][color=#007700]= ([/color][color=#0000bb]8[/color][color=#007700]*[/color][color=#0000bb]c [/color][color=#007700]- [/color][color=#0000bb]b[/color][color=#007700])/[/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a[/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]"x:"[/color][color=#007700]+(int)[/color][color=#0000bb]x[/color][color=#007700]);}}[/color]
</div>
</div>
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bai03 (move your mouse to reveal the content)</noscript>
bai03 (open)
bai03 (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
[/color][color=#007700]public class [/color][color=#0000bb]demo [/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 a[/color][color=#007700], [/color][color=#0000bb]b[/color][color=#007700], [/color][color=#0000bb]c[/color][color=#007700], [/color][color=#0000bb]s[/color][color=#007700];[/color][color=#0000bb]a [/color][color=#007700]= [/color][color=#0000bb]4[/color][color=#007700];[/color][color=#0000bb]b [/color][color=#007700]= [/color][color=#0000bb]6[/color][color=#007700];[/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]8[/color][color=#007700];[/color][color=#0000bb]float p [/color][color=#007700]= (float)([/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700])/[/color][color=#0000bb]2[/color][color=#007700];[/color][color=#0000bb]s [/color][color=#007700]= (float)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]p [/color][color=#007700]* ([/color][color=#0000bb]p [/color][color=#007700]- [/color][color=#0000bb]a[/color][color=#007700]) * ([/color][color=#0000bb]p [/color][color=#007700]- [/color][color=#0000bb]b[/color][color=#007700]) * ([/color][color=#0000bb]p [/color][color=#007700]- [/color][color=#0000bb]c[/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]"dien tich tam giac:"[/color][color=#007700]+[/color][color=#0000bb]s[/color][color=#007700]);}}[/color]
</div>
</div>
-
08-07-2014, 07:00 AM #112Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 10
<div style="padding-left: 30px"><div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bai tap ve nha (move your mouse to reveal the content)</noscript>
bai tap ve nha (open)
bai tap ve nha (close)
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package baitapvenha[/color][color=#007700];[/color][color=#ff8000]/*** bài 1: các biến a, b, c là các số nguyên. gán giá* trị cho các biến. tìm phần nguyên khi chia các số này cho 2, tìm phần* dư khi chia các số này cho 3, in kết quả ra màn hình. tăng giá trị a,* b, c mỗi biến lên 1, in giá trị 3 số ra màn hình.*/[/color][color=#007700]public class [/color][color=#0000bb]btvnbuoi4 [/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]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"===> bai 1:"[/color][color=#007700]+ [/color][color=#dd0000]" các biến a, b, c là các số nguyên. gán giá trị cho các biến. "[/color][color=#007700]+ [/color][color=#dd0000]" tìm phần nguyên khi chia các số này cho 2, tìm phần dư khi chia các số này cho 3, in kết quả ra màn hình."[/color][color=#007700]+ [/color][color=#dd0000]" tăng giá trị a, b, c mỗi biến lên 1, in giá trị 3 số ra màn hình."[/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]"
==> bai lam <=="[/color][color=#007700]);[/color][color=#0000bb]int a[/color][color=#007700]=[/color][color=#0000bb]5[/color][color=#007700],[/color][color=#0000bb]b[/color][color=#007700]=[/color][color=#0000bb]10[/color][color=#007700],[/color][color=#0000bb]c[/color][color=#007700]=[/color][color=#0000bb]15[/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]"phan nguyen cua ("[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700]+[/color][color=#dd0000]":2) = "[/color][color=#007700]+([/color][color=#0000bb]a[/color][color=#007700]/[/color][color=#0000bb]2[/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]"phan nguyen cua ("[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]+[/color][color=#dd0000]":2) = "[/color][color=#007700]+([/color][color=#0000bb]b[/color][color=#007700]/[/color][color=#0000bb]2[/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]"phan nguyen cua ("[/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700]+[/color][color=#dd0000]":2) = "[/color][color=#007700]+([/color][color=#0000bb]c[/color][color=#007700]/[/color][color=#0000bb]2[/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]"phan du: "[/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]a[/color][color=#007700]+[/color][color=#dd0000]"%3)="[/color][color=#007700]+([/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]3[/color][color=#007700])+[/color][color=#dd0000]" ; ("[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]+[/color][color=#dd0000]"%3)="[/color][color=#007700]+([/color][color=#0000bb]b[/color][color=#007700]%[/color][color=#0000bb]3[/color][color=#007700])+[/color][color=#dd0000]" ; ("[/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700]+[/color][color=#dd0000]"%3)="[/color][color=#007700]+([/color][color=#0000bb]c[/color][color=#007700]%[/color][color=#0000bb]3[/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]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"gia tri moi: (a,b,c) = ("[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700]+[/color][color=#dd0000]","[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]+[/color][color=#dd0000]","[/color][color=#007700]+[/color][color=#0000bb]c[/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]"
===> bai 2:"[/color][color=#007700]+ [/color][color=#dd0000]" giải phương trình 2ax+b = 8c với a, b, c là số thực – được gán giá trị trong chương trình, x cũng là số thực, là giá trị cần tìm."[/color][color=#007700]+ [/color][color=#dd0000]" sau khi tính x in kết quả ra màn hình, ép kiểu x về số nguyên, in kết quả ép kiểu của x ra màn hình!"[/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]"
==> bai lam <=="[/color][color=#007700]);[/color][color=#0000bb]float _a[/color][color=#007700]=[/color][color=#0000bb]5.5f[/color][color=#007700],[/color][color=#0000bb]_b[/color][color=#007700]=[/color][color=#0000bb]6f[/color][color=#007700],[/color][color=#0000bb]_c[/color][color=#007700]=[/color][color=#0000bb]10f[/color][color=#007700];[/color][color=#0000bb]float x[/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]"phuong trinh co dang: f(x) = (2ax+b=8c) ==> "[/color][color=#007700]+([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]_a[/color][color=#007700])+[/color][color=#dd0000]"x + "[/color][color=#007700]+[/color][color=#0000bb]_b[/color][color=#007700]+[/color][color=#dd0000]" = "[/color][color=#007700]+([/color][color=#0000bb]8[/color][color=#007700]*[/color][color=#0000bb]_c[/color][color=#007700]));[/color][color=#0000bb]x [/color][color=#007700]= ([/color][color=#0000bb]8[/color][color=#007700]*[/color][color=#0000bb]_c[/color][color=#007700]-[/color][color=#0000bb]_b[/color][color=#007700])/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]_a[/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]"giai phuong trinh ta co: x = ("[/color][color=#007700]+[/color][color=#0000bb]8[/color][color=#007700]*[/color][color=#0000bb]_c[/color][color=#007700]+[/color][color=#dd0000]"-"[/color][color=#007700]+[/color][color=#0000bb]_b[/color][color=#007700]+[/color][color=#dd0000]")/("[/color][color=#007700]+([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700])+[/color][color=#dd0000]") = "[/color][color=#007700]+[/color][color=#0000bb]x[/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]"phan nguyen cua x = "[/color][color=#007700]+(int)[/color][color=#0000bb]x[/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]"
===> bai 3:"[/color][color=#007700]+ [/color][color=#dd0000]" cho a, b, c là độ dài 3 cạnh tam giác, a, b, c được gán giá trị trong chương trình. "[/color][color=#007700]+ [/color][color=#dd0000]" viết chương trình tính diện tích s của tam giác, in kết quả ra màn hình. tìm số đo 3 góc của tam giác đó, in kết quả ra màn hình."[/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]"
==> bai lam <=="[/color][color=#007700]);[/color][color=#0000bb]double c1[/color][color=#007700]=[/color][color=#0000bb]20[/color][color=#007700],[/color][color=#0000bb]c2[/color][color=#007700]=[/color][color=#0000bb]10[/color][color=#007700], [/color][color=#0000bb]c3[/color][color=#007700]=[/color][color=#0000bb]25[/color][color=#007700];[/color][color=#0000bb]double p[/color][color=#007700]=([/color][color=#0000bb]c1[/color][color=#007700]+[/color][color=#0000bb]c2[/color][color=#007700]+[/color][color=#0000bb]c3[/color][color=#007700])/[/color][color=#0000bb]2[/color][color=#007700],[/color][color=#0000bb]s[/color][color=#007700];[/color][color=#0000bb]s [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]p[/color][color=#007700]*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]c1[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]c2[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]c3[/color][color=#007700]));[/color][color=#0000bb]double _cosc1 [/color][color=#007700]= ([/color][color=#0000bb]c2[/color][color=#007700]*[/color][color=#0000bb]c2[/color][color=#007700]+[/color][color=#0000bb]c3[/color][color=#007700]*[/color][color=#0000bb]c3[/color][color=#007700]-[/color][color=#0000bb]c1[/color][color=#007700]*[/color][color=#0000bb]c1[/color][color=#007700])/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]c2[/color][color=#007700]*[/color][color=#0000bb]c3[/color][color=#007700]);[/color][color=#0000bb]double _cosc2 [/color][color=#007700]= ([/color][color=#0000bb]c1[/color][color=#007700]*[/color][color=#0000bb]c1[/color][color=#007700]+[/color][color=#0000bb]c3[/color][color=#007700]*[/color][color=#0000bb]c3[/color][color=#007700]-[/color][color=#0000bb]c2[/color][color=#007700]*[/color][color=#0000bb]c2[/color][color=#007700])/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]c1[/color][color=#007700]*[/color][color=#0000bb]c3[/color][color=#007700]);[/color][color=#0000bb]double _cosc3 [/color][color=#007700]= ([/color][color=#0000bb]c2[/color][color=#007700]*[/color][color=#0000bb]c2[/color][color=#007700]+[/color][color=#0000bb]c1[/color][color=#007700]*[/color][color=#0000bb]c1[/color][color=#007700]-[/color][color=#0000bb]c3[/color][color=#007700]*[/color][color=#0000bb]c3[/color][color=#007700])/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]c2[/color][color=#007700]*[/color][color=#0000bb]c1[/color][color=#007700]);[/color][color=#0000bb]double c1 [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]todegrees[/color][color=#007700]([/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]acos[/color][color=#007700]([/color][color=#0000bb]_cosc1[/color][color=#007700]));[/color][color=#0000bb]double c2 [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]todegrees[/color][color=#007700]([/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]acos[/color][color=#007700]([/color][color=#0000bb]_cosc2[/color][color=#007700]));[/color][color=#0000bb]double c3 [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]todegrees[/color][color=#007700]([/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]acos[/color][color=#007700]([/color][color=#0000bb]_cosc3[/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]"dien tich cua tam giac abc("[/color][color=#007700]+[/color][color=#0000bb]c1[/color][color=#007700]+[/color][color=#dd0000]","[/color][color=#007700]+[/color][color=#0000bb]c2[/color][color=#007700]+[/color][color=#dd0000]","[/color][color=#007700]+[/color][color=#0000bb]c3[/color][color=#007700]+[/color][color=#dd0000]") = "[/color][color=#007700]+[/color][color=#0000bb]s[/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]"so do 3 canh cua tam giac abc("[/color][color=#007700]+[/color][color=#0000bb]c1[/color][color=#007700]+[/color][color=#dd0000]","[/color][color=#007700]+[/color][color=#0000bb]c2[/color][color=#007700]+[/color][color=#dd0000]","[/color][color=#007700]+[/color][color=#0000bb]c3[/color][color=#007700]+[/color][color=#dd0000]") la ("[/color][color=#007700]+[/color][color=#0000bb]c1[/color][color=#007700]+[/color][color=#dd0000]","[/color][color=#007700]+[/color][color=#0000bb]c2[/color][color=#007700]+[/color][color=#dd0000]","[/color][color=#007700]+[/color][color=#0000bb]c3[/color][color=#007700]+[/color][color=#dd0000]")"[/color][color=#007700]); }}[/color]
</div>
</div></div></div>
-
08-25-2014, 07:00 AM #113Banned
- Ngày tham gia
- Jan 2015
- Bài viết
- 0
Mã nguồn PHP:[color=#000000]
[/color][color=#007700]public class [/color][color=#0000bb]btap_1 [/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]int a[/color][color=#007700],[/color][color=#0000bb]b[/color][color=#007700],[/color][color=#0000bb]c[/color][color=#007700]; [/color][color=#0000bb]a[/color][color=#007700]=[/color][color=#0000bb]3[/color][color=#007700]; [/color][color=#0000bb]b[/color][color=#007700]=[/color][color=#0000bb]8[/color][color=#007700]; [/color][color=#0000bb]c[/color][color=#007700]=[/color][color=#0000bb]12[/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]"phần nguyên " [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]+[/color][color=#dd0000]" chia 2 là:" [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]/ [/color][color=#0000bb]2[/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]"phần nguyên " [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]+[/color][color=#dd0000]" chia 2 là:" [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]/[/color][color=#0000bb]2[/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]"phần nguyên " [/color][color=#007700]+ [/color][color=#0000bb]c [/color][color=#007700]+[/color][color=#dd0000]" chia 2 là:" [/color][color=#007700]+ [/color][color=#0000bb]c [/color][color=#007700]/ [/color][color=#0000bb]2[/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]"phần dư " [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]+[/color][color=#dd0000]" chia 3 là:" [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]% [/color][color=#0000bb]2[/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]"phần dư " [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]+[/color][color=#dd0000]" chia 3 là:" [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]% [/color][color=#0000bb]2[/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]"phần dư " [/color][color=#007700]+ [/color][color=#0000bb]c [/color][color=#007700]+[/color][color=#dd0000]" chia 3 là:" [/color][color=#007700]+ [/color][color=#0000bb]c [/color][color=#007700]% [/color][color=#0000bb]2[/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]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"số a sau khi tăng 1 đơn vị là:" [/color][color=#007700]+ [/color][color=#0000bb]a[/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]"số b sau khi tăng 1 đơn vị là:" [/color][color=#007700]+ [/color][color=#0000bb]b[/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]"số c sau khi tăng 1 đơn vị là:" [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700]); } }[/color]
-
08-25-2014, 07:00 AM #114Junior Member
- Ngày tham gia
- May 2014
- Bài viết
- 0
public class btap_1 {
public static void main(string[] args) {
int a,b,c;
a=3; b=8; c=12;
system.out.println("phần nguyên " + a +" chia 2 là:" + a / 2);
system.out.println("phần nguyên " + b +" chia 2 là:" + b /2);
system.out.println("phần nguyên " + c +" chia 2 là:" + c / 2);
system.out.println("phần dư " + a +" chia 3 là:" + a % 2);
system.out.println("phần dư " + b +" chia 3 là:" + b % 2);
system.out.println("phần dư " + c +" chia 3 là:" + c % 2);
a++; b++; c++;
system.out.println("số a sau khi tăng 1 đơn vị là:" + a);
system.out.println("số b sau khi tăng 1 đơn vị là:" + b);
system.out.println("số c sau khi tăng 1 đơn vị là:" + c);
}
}
-
08-31-2014, 07:00 AM #115Junior Member
- Ngày tham gia
- Apr 2014
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bai 1 (move your mouse to reveal the content)</noscript>
bai 1 (open)
bai 1 (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã:public class kell { public static void main(string[] args) { int a,b,c; a=1;b=2;c=3; system.out.println("phan nguyen khi chia "+a+" cho 2 = "+a/2); system.out.println("phan nguyen khi chia "+b+" cho 2 = "+b/2); system.out.println("phan nguyen khi chia "+c+" cho 2 = "+c/2); system.out.println("phan du khi chia "+a+" cho 2 = "+a%2); system.out.println("phan du khi chia "+b+" cho 2 = "+b%2); system.out.println("phan du khi chia "+c+" cho 2 = "+c%2); a++;b++;c++; system.out.println("tang len 1 don vi = "+a); system.out.println("tang len 1 don vi = "+b); system.out.println("tang len 1 don vi = "+c); } }
</div>
</div>
-
08-31-2014, 07:00 AM #116Junior Member
- Ngày tham gia
- Nov 2014
- Bài viết
- 11
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bài 2 (move your mouse to reveal the content)</noscript>
bài 2 (open)
bài 2 (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã:public class kell { public static void main(string[] args) { float a,b,c,x; a=2.4f;b=5.0f;c=4.6f; if(a==0) system.out.println("nhap sai roi babe"); else { x=(8*c-b)/(2*a); system.out.println("ket qua x cua phep tinh 2ax+b = 8c la: x= "+x); x=(int)x; system.out.println("ket qua cua x sau khi ep kieu la: x= "+x); } } }
</div>
</div>
-
08-31-2014, 07:00 AM #117Junior Member
- Ngày tham gia
- Jun 2014
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bai 3 (move your mouse to reveal the content)</noscript>
bai 3 (open)
bai 3 (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã:public class kell { public static void main(string[] args) { int a,b,c; a=3;b=5;c=4; if(a+b<=c||a+c<=b||b+c<=a) { system.out.println("day khong phai tam giac"); } else { float t=(a+b+c)/2; float s; s=(float)math.sqrt(t*(t-a)*(t-b)*(t-c)); system.out.println("dien tich cua hinh "+s); float goc1=(float)math.asin((double)(2*s)/(a*b)); float goc2=(float)math.asin((double)(2*s)/(c*b)); float goc3=(float)math.asin((double)(2*s)/(a*c)); system.out.println("goc giua canh a va b "+goc1); system.out.println("goc giua canh c va b "+goc2); system.out.println("goc giua canh c va a "+goc3); } } }
</div>
</div>
-
09-14-2014, 07:00 AM #118Junior Member
- Ngày tham gia
- Sep 2014
- Bài viết
- 0
em lam bai tap bang eclipse thi lam sao de dua duoc code len de cham bai ha anh?????em moi bat dau hoc java.mong cac anh giup
-
09-28-2014, 07:00 AM #119Junior Member
- Ngày tham gia
- Apr 2015
- 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>
Mã nguồn PHP:[color=#000000]
[/color][color=#007700]public class [/color][color=#0000bb]timphandunguyen [/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]int a [/color][color=#007700]= [/color][color=#0000bb]6[/color][color=#007700]; [/color][color=#0000bb]int b [/color][color=#007700]= [/color][color=#0000bb]7[/color][color=#007700]; [/color][color=#0000bb]int c [/color][color=#007700]= [/color][color=#0000bb]8[/color][color=#007700]; [/color][color=#0000bb]int phannguyen1[/color][color=#007700], [/color][color=#0000bb]phannguyen2[/color][color=#007700], [/color][color=#0000bb]phannguyen3[/color][color=#007700]; [/color][color=#0000bb]int phandu1[/color][color=#007700], [/color][color=#0000bb]phandu2[/color][color=#007700], [/color][color=#0000bb]phandu3[/color][color=#007700]; [/color][color=#0000bb]phannguyen1 [/color][color=#007700]= [/color][color=#0000bb]a [/color][color=#007700]/ [/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]phannguyen2 [/color][color=#007700]= [/color][color=#0000bb]b [/color][color=#007700]/ [/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]phannguyen3 [/color][color=#007700]= [/color][color=#0000bb]c [/color][color=#007700]/ [/color][color=#0000bb]2[/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]"phần nguyên của a: " [/color][color=#007700]+ [/color][color=#0000bb]phannguyen1[/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]"phần nguyên của b: " [/color][color=#007700]+ [/color][color=#0000bb]phannguyen2[/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]"phần nguyên của c: " [/color][color=#007700]+ [/color][color=#0000bb]phannguyen3[/color][color=#007700]); [/color][color=#0000bb]phandu1 [/color][color=#007700]= [/color][color=#0000bb]a [/color][color=#007700]% [/color][color=#0000bb]3[/color][color=#007700]; [/color][color=#0000bb]phandu2 [/color][color=#007700]= [/color][color=#0000bb]b [/color][color=#007700]% [/color][color=#0000bb]3[/color][color=#007700]; [/color][color=#0000bb]phandu3 [/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]"phần dư của a: " [/color][color=#007700]+ [/color][color=#0000bb]phandu1[/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]"phần dư của b: " [/color][color=#007700]+ [/color][color=#0000bb]phandu2[/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]"phần dư của c: " [/color][color=#007700]+ [/color][color=#0000bb]phandu3[/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]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giá trị của a sau khi tăng 1: " [/color][color=#007700]+ [/color][color=#0000bb]a[/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]"giá trị của b sau khi tăng 1: " [/color][color=#007700]+ [/color][color=#0000bb]b[/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]"giá trị của c sau khi tăng 1: " [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700]); } }[/color]
</div>
</div>
<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>
Mã nguồn PHP:[color=#000000]
[/color][color=#007700]public class [/color][color=#0000bb]giaiphuongtrinh [/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 a [/color][color=#007700]= [/color][color=#0000bb]5[/color][color=#007700], [/color][color=#0000bb]b [/color][color=#007700]= [/color][color=#0000bb]6[/color][color=#007700], [/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]7[/color][color=#007700]; [/color][color=#0000bb]float x[/color][color=#007700]; [/color][color=#0000bb]int x1[/color][color=#007700]; [/color][color=#0000bb]x [/color][color=#007700]= ([/color][color=#0000bb]8 [/color][color=#007700]* [/color][color=#0000bb]c [/color][color=#007700]- [/color][color=#0000bb]b[/color][color=#007700]) / ([/color][color=#0000bb]2 [/color][color=#007700]* [/color][color=#0000bb]a[/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]"giá trị của x là: " [/color][color=#007700]+ [/color][color=#0000bb]x[/color][color=#007700]); [/color][color=#0000bb]x1 [/color][color=#007700]= (int) [/color][color=#0000bb]x[/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]"giá trị ép kiểu của x là: " [/color][color=#007700]+[/color][color=#0000bb]x1[/color][color=#007700]); } }[/color]
</div>
</div>
<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>
Mã nguồn PHP:[color=#000000]
[/color][color=#007700]public class [/color][color=#0000bb]dientichtamgiac [/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]int a [/color][color=#007700]= [/color][color=#0000bb]50[/color][color=#007700], [/color][color=#0000bb]b [/color][color=#007700]=[/color][color=#0000bb]24[/color][color=#007700], [/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]45[/color][color=#007700]; [/color][color=#0000bb]int dientich1[/color][color=#007700]; [/color][color=#0000bb]float dientich[/color][color=#007700], [/color][color=#0000bb]chuvi[/color][color=#007700]; [/color][color=#0000bb]chuvi [/color][color=#007700]= (float) ([/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700]) / [/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]dientich [/color][color=#007700]= (float) [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]chuvi [/color][color=#007700]* ([/color][color=#0000bb]chuvi [/color][color=#007700]- [/color][color=#0000bb]a[/color][color=#007700]) * ([/color][color=#0000bb]chuvi [/color][color=#007700]- [/color][color=#0000bb]b[/color][color=#007700]) * ([/color][color=#0000bb]chuvi [/color][color=#007700]- [/color][color=#0000bb]c[/color][color=#007700])); [/color][color=#0000bb]dientich1 [/color][color=#007700]= (int) [/color][color=#0000bb]dientich[/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]"diện tích của tam giác: " [/color][color=#007700]+ [/color][color=#0000bb]dientich1[/color][color=#007700]); }}[/color]
</div>
</div>
-
10-04-2014, 07:00 AM #120Junior Member
- Ngày tham gia
- Dec 2014
- Bài viết
- 0
mình nộp bài , cảm ơn "thầy" nhé
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bài tập 1 (move your mouse to reveal the content)</noscript>
bài tập 1 (open)
bài tập 1 (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]io[/color][color=#007700].*;class [/color][color=#0000bb]baisomot [/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]int a [/color][color=#007700]= [/color][color=#0000bb]10[/color][color=#007700]; [/color][color=#0000bb]int b [/color][color=#007700]= [/color][color=#0000bb]15[/color][color=#007700]; [/color][color=#0000bb]int c [/color][color=#007700]= [/color][color=#0000bb]22[/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]"kết quả phần nguyên của " [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]+[/color][color=#dd0000]" chia cho 2 là " [/color][color=#007700]+([/color][color=#0000bb]a[/color][color=#007700]/[/color][color=#0000bb]2[/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]"kết quả phần nguyên của " [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]+[/color][color=#dd0000]" chia cho 2 là " [/color][color=#007700]+([/color][color=#0000bb]b[/color][color=#007700]/[/color][color=#0000bb]2[/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]"kết quả phần nguyên của " [/color][color=#007700]+ [/color][color=#0000bb]c [/color][color=#007700]+[/color][color=#dd0000]" chia cho 2 là " [/color][color=#007700]+([/color][color=#0000bb]c[/color][color=#007700]/[/color][color=#0000bb]2[/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]"kết quả phần dư của " [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]+[/color][color=#dd0000]" chia cho 3 là " [/color][color=#007700]+([/color][color=#0000bb]a[/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]"kết quả phần dư của " [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]+[/color][color=#dd0000]" chia cho 3 là " [/color][color=#007700]+([/color][color=#0000bb]b[/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]"kết quả phần dư của " [/color][color=#007700]+ [/color][color=#0000bb]c [/color][color=#007700]+[/color][color=#dd0000]" chia cho 3 là " [/color][color=#007700]+([/color][color=#0000bb]c[/color][color=#007700]/[/color][color=#0000bb]3[/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]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]"giá trị mới của a khi tăng lên 1 biến " [/color][color=#007700]+[/color][color=#0000bb]a[/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]"giá trị mới của a khi tăng lên 1 biến " [/color][color=#007700]+[/color][color=#0000bb]b[/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]"giá trị mới của a khi tăng lên 1 biến " [/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700]);[/color]
</div>
</div>
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bài tập 2 (move your mouse to reveal the content)</noscript>
bài tập 2 (open)
bài tập 2 (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]io[/color][color=#007700].*;class [/color][color=#0000bb]baisohai [/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 a [/color][color=#007700]= [/color][color=#0000bb]10.5f[/color][color=#007700]; [/color][color=#0000bb]float b [/color][color=#007700]= [/color][color=#0000bb]5.7f[/color][color=#007700]; [/color][color=#0000bb]float c [/color][color=#007700]= [/color][color=#0000bb]11.4f[/color][color=#007700]; [/color][color=#0000bb]float x[/color][color=#007700]; [/color][color=#0000bb]x [/color][color=#007700]= ([/color][color=#0000bb]8[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700]-[/color][color=#0000bb]b[/color][color=#007700])/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a[/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]"gia trị x cần tìm là " [/color][color=#007700]+ [/color][color=#0000bb]x[/color][color=#007700]); [/color][color=#0000bb]float sothuc [/color][color=#007700]= [/color][color=#0000bb]x[/color][color=#007700]; [/color][color=#0000bb]int songuyen[/color][color=#007700]; [/color][color=#0000bb]songuyen [/color][color=#007700]= (int) [/color][color=#0000bb]sothuc[/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]"giá trị nguyên của x là " [/color][color=#007700]+[/color][color=#0000bb]songuyen[/color][color=#007700]); }[/color]
</blockquote></div>
</div>
</div>
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>bài tập 3 (move your mouse to reveal the content)</noscript>
bài tập 3 (open)
bài tập 3 (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]io[/color][color=#007700].*;class [/color][color=#0000bb]baisoba [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string args[/color][color=#007700][]) {[/color][color=#0000bb]double a[/color][color=#007700]=[/color][color=#0000bb]5 [/color][color=#007700], [/color][color=#0000bb]b[/color][color=#007700]=[/color][color=#0000bb]6 [/color][color=#007700], [/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]10 [/color][color=#007700],[/color][color=#0000bb]p [/color][color=#007700],[/color][color=#0000bb]s[/color][color=#007700];[/color][color=#0000bb]p [/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]2[/color][color=#007700];[/color][color=#0000bb]s [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]p[/color][color=#007700]*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]a[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]b[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]c[/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 diện tích tam giác là " [/color][color=#007700]+[/color][color=#0000bb]s[/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]"không biết công thức tính góc :p"[/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