-
09-09-2013, 07:00 AM #11Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
Gửi bởi fannt
-
09-09-2013, 07:00 AM #12Junior Member
- Ngày tham gia
- Jul 2015
- Bài viết
- 0
câu 1
<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]bai5_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]a[/color][color=#007700]=[/color][color=#0000bb]50[/color][color=#007700]; if ([/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]5 [/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]"a = " [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#dd0000]" chia het cho 5"[/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]"a = " [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#dd0000]" khong chia het cho 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]"a/5 = " [/color][color=#007700]+ ([/color][color=#0000bb]a[/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]"a chia 5 du " [/color][color=#007700]+ ([/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]5[/color][color=#007700])); } }}[/color]
</div>
</div>
câu 2
<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]bai5_2 [/color][color=#007700]{ public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]) { [/color][color=#ff8000]/* * cho trước độ dài 3 cạnh(số thực, cả âm và dương) * kiểm tra đó có phải là tam giác không. nếu có là tam giác gì? */ [/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]a [/color][color=#007700]= -[/color][color=#0000bb]5[/color][color=#007700]; [/color][color=#0000bb]b [/color][color=#007700]= [/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]7[/color][color=#007700]; if(([/color][color=#0000bb]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]b [/color][color=#007700]< [/color][color=#0000bb]c[/color][color=#007700]) && ([/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#0000bb]c [/color][color=#007700]> [/color][color=#0000bb]b[/color][color=#007700]) && ([/color][color=#0000bb]a [/color][color=#007700]- [/color][color=#0000bb]c [/color][color=#007700]< [/color][color=#0000bb]b[/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]b [/color][color=#007700]- [/color][color=#0000bb]c [/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]"đây là một tam giác"[/color][color=#007700]); if ([/color][color=#0000bb]a [/color][color=#007700]== [/color][color=#0000bb]b [/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]"đây là tam giác đều."[/color][color=#007700]); } else if( [/color][color=#0000bb]a [/color][color=#007700]== [/color][color=#0000bb]b [/color][color=#007700]|| [/color][color=#0000bb]b [/color][color=#007700]==[/color][color=#0000bb]c [/color][color=#007700]|| [/color][color=#0000bb]c [/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]"đây là tam giác cân"[/color][color=#007700]); } else if( ((double)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]) == (double)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]b [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700])) || ((double)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]b[/color][color=#007700]) == (double)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700])) || ((double)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]c[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700]) == (double)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]b [/color][color=#007700]+ [/color][color=#0000bb]a[/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]"đây là tam giác vuông"[/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]"đây là tam giac thường"[/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]"đây không phải là một tam giác"[/color][color=#007700]); } }}[/color]
</div>
</div>
câu 3
<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]bai5_3 [/color][color=#007700]{ [/color][color=#ff8000]/* * giải phương trình bậc 2: a * x^2 + b*x + c = 0, a,b,c là số thực */ [/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]0[/color][color=#007700]; [/color][color=#0000bb]b [/color][color=#007700]= [/color][color=#0000bb]0[/color][color=#007700]; [/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]0[/color][color=#007700]; if([/color][color=#0000bb]a [/color][color=#007700]== [/color][color=#0000bb]0[/color][color=#007700]){ if([/color][color=#0000bb]b [/color][color=#007700]== [/color][color=#0000bb]0[/color][color=#007700]){ if([/color][color=#0000bb]c[/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]"phương trình có vô số nghiệm"[/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]"phương trình vô nghiệm"[/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]"phương trình đã cho có 1 nghiệm duy nhất x = " [/color][color=#007700]+ (-[/color][color=#0000bb]c[/color][color=#007700]/[/color][color=#0000bb]b[/color][color=#007700])); } } else{ if(([/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]b [/color][color=#007700]- [/color][color=#0000bb]4[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]c[/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]"phương trình có một nghiệm kép: x = " [/color][color=#007700]+ (-[/color][color=#0000bb]b[/color][color=#007700]/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]))); } else if(([/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]b [/color][color=#007700]- [/color][color=#0000bb]4[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]c[/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]"phương trình đã cho vô nghiệm"[/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]"phương trình có 2 nghiệm phân biệt x1 = " [/color][color=#007700]+ ((-[/color][color=#0000bb]b[/color][color=#007700]-(double)([/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]b [/color][color=#007700]- [/color][color=#0000bb]4[/color][color=#007700]*[/color][color=#0000bb]a[/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=#dd0000]"và x2 = " [/color][color=#007700]+ ((-[/color][color=#0000bb]b[/color][color=#007700]+(double)([/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]b [/color][color=#007700]- [/color][color=#0000bb]4[/color][color=#007700]*[/color][color=#0000bb]a[/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]
</div>
</div>
bạn tiasangmoi92 và các bạn góp ý giúp mình với
thanks !
-
09-11-2013, 07:00 AM #13Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
bài 1 của e
<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></blockquote></div>
</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ã:public static void main(string[] args) {[/size] int a = 10000; if (a%5==0){ system.out.println("a la so chia het cho 5"); }else{ system.out.println("a khong chia het cho 5"); system.out.println("thuong a/5: "+a/5); system.out.println("so du a/5: "+a%5); } } [size=15px][size=15px]}
</div>
</div>[/size]
-
09-11-2013, 07:00 AM #14Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
bài 1 của e
<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></blockquote></div>
</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ã:public static void main(string[] args) {[/size] int a = 10000; if (a%5==0){ system.out.println("a la so chia het cho 5"); }else{ system.out.println("a khong chia het cho 5"); system.out.println("thuong a/5: "+a/5); system.out.println("so du a/5: "+a%5); } }
<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></blockquote></div>
</div>
</div></blockquote></div>
</div>
</div>
-
09-11-2013, 07:00 AM #15Junior Member
- Ngày tham gia
- Feb 2015
- Bài viết
- 0
bài 2 của e
<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ã:public static void main(string[] args) { double a= 3, b=4, c=5; if (a + b > c && a + c > b && b + c > a) { system.out.println("a, b, c là độ dài của giác tam giác"); }else{ system.out.println("a, b, c không phải là độ dài của một tam giác");} if (a == b || a == c || b == c){ system.out.println("a, b, c là độ dài của một tam giác cân");} if (a == b && a == c){ system.out.println("a, b, c là độ dài của một tam giác đều");} if (a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b){ system.out.println("a, b, c là độ dài của một tam giác vuông");} }
</div>
</div>
bài 3 của e
<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ã:public class giaiptbac2 { public static void main(string[] args) { double a, b, c, x1, x2, x, delta; a = 5; b = -1; c = 19; if (a == 0){ x = (0-c)/b; system.out.println("nghiệm của phương trình là: "+ x); }else{ delta = b*b - 4*a*c; if (delta < 0){ system.out.println("phương trình vô nghiệm");} if (delta == 0){ x1 = x2 = -a / 2*b; system.out.println("phương trình có nghiệm x1 = x2 = "+ delta);} if (delta > 0){ x1 = (-b + math.sqrt(delta)) / 2*a; x2 = (-b - math.sqrt(delta)) / 2*a; system.out.println("phương trình có nghiệm x1= "+ x1 +", x2= "+ x2);} } } }
</div>
</div>
-
09-12-2013, 07:00 AM #16Junior Member
- Ngày tham gia
- Mar 2015
- Bài viết
- 0
Gửi bởi hahuu
-
09-15-2013, 07:00 AM #17Banned
- Ngày tham gia
- Nov 2014
- Bài viết
- 0
câu 3:
Mã nguồn PHP:[color=#000000]
[/color][color=#007700]public class [/color][color=#0000bb]bai1 [/color][color=#007700]{ public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]) { [/color][color=#ff8000]//giai pt bac 2 ax^2 + bx + c = 0 [/color][color=#0000bb]int a[/color][color=#007700],[/color][color=#0000bb]b[/color][color=#007700],[/color][color=#0000bb]cdelta[/color][color=#007700]; [/color][color=#0000bb]a [/color][color=#007700]= [/color][color=#0000bb]2[/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]3[/color][color=#007700]; if ([/color][color=#0000bb]a[/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]"không phải pt bậc 2 và có nghiệm là:"[/color][color=#007700]+ -[/color][color=#0000bb]c[/color][color=#007700]/[/color][color=#0000bb]b[/color][color=#007700]); }else{ [/color][color=#0000bb]delta[/color][color=#007700]=[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqr[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700]) - [/color][color=#0000bb]4[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700]; if([/color][color=#0000bb]delta[/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]"pt có 2 nghiệm:"[/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]"nghiệm x1:"[/color][color=#007700]+ (-[/color][color=#0000bb]b[/color][color=#007700]-[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]delta[/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]"nghiệm x2:"[/color][color=#007700]+ (-[/color][color=#0000bb]b[/color][color=#007700]+[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]delta[/color][color=#007700])/[/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700])); }else{ if ([/color][color=#0000bb]delta[/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]"pt có nghiệm kép là:"[/color][color=#007700]+ [/color][color=#0000bb]b[/color][color=#007700]/[/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]); }else{ if ([/color][color=#0000bb]delta[/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]"pt vô nghiệm!"[/color][color=#007700]); } } } } }}[/color]
-
09-30-2013, 07:00 AM #18Junior Member
- Ngày tham gia
- Aug 2014
- Bài viết
- 0
bai 1 :<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 class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote></blockquote></div>
</div>
</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]
import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].*;class [/color][color=#0000bb]chiahet [/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]y [/color][color=#007700],[/color][color=#0000bb]x[/color][color=#007700]; if([/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]5[/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]"a chia het cho 5 "[/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]"thuong = "[/color][color=#007700]+(float)+[/color][color=#0000bb]a[/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]"so du = " [/color][color=#007700]+(int)+[/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]5[/color][color=#007700]); }}[/color]
</div>
</div>
-
10-01-2013, 07:00 AM #19Junior Member
- Ngày tham gia
- Jul 2015
- Bài viết
- 0
bài 1:
<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]bai1 [/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]16[/color][color=#007700]; if([/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]5[/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]"a chia het cho 5"[/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]"thuong la: " [/color][color=#007700]+ [/color][color=#0000bb]a[/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]"so du la: " [/color][color=#007700]+ [/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]5[/color][color=#007700]); } }}[/color]
</div>
</div>
bài 2:
<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]bai2 [/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]double a [/color][color=#007700]= [/color][color=#0000bb]3[/color][color=#007700]; [/color][color=#0000bb]double b [/color][color=#007700]= [/color][color=#0000bb]3[/color][color=#007700]; [/color][color=#0000bb]double c [/color][color=#007700]= [/color][color=#0000bb]5[/color][color=#007700]; if([/color][color=#0000bb]a[/color][color=#007700]<= [/color][color=#0000bb]0 [/color][color=#007700]|| [/color][color=#0000bb]b [/color][color=#007700]<= [/color][color=#0000bb]0 [/color][color=#007700]|| [/color][color=#0000bb]c [/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]"a, b, c khong phai canh tam giac"[/color][color=#007700]); } if([/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]< [/color][color=#0000bb]c [/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]a [/color][color=#007700]+ [/color][color=#0000bb]c [/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]"a, b, c khong phai canh tam giac"[/color][color=#007700]); }else { if ([/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]b [/color][color=#007700]== [/color][color=#0000bb]c[/color][color=#007700]*[/color][color=#0000bb]c [/color][color=#007700]|| [/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]b [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700]*[/color][color=#0000bb]c [/color][color=#007700]== [/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]a [/color][color=#007700]|| [/color][color=#0000bb]c[/color][color=#007700]*[/color][color=#0000bb]c [/color][color=#007700]+ [/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]a [/color][color=#007700]== [/color][color=#0000bb]b[/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]"la tam giac vuong"[/color][color=#007700]); } if([/color][color=#0000bb]a[/color][color=#007700]==[/color][color=#0000bb]b[/color][color=#007700]&& [/color][color=#0000bb]b[/color][color=#007700]==[/color][color=#0000bb]c [/color][color=#007700]&& [/color][color=#0000bb]c[/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]"la tam giac deu"[/color][color=#007700]); } if([/color][color=#0000bb]a[/color][color=#007700]==[/color][color=#0000bb]b [/color][color=#007700]|| [/color][color=#0000bb]b[/color][color=#007700]==[/color][color=#0000bb]c [/color][color=#007700]|| [/color][color=#0000bb]c[/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]"la tam giac can"[/color][color=#007700]); } } }}[/color]
</div>
</div>
bài 3:
<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]bai3 [/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]double a [/color][color=#007700]= [/color][color=#0000bb]1[/color][color=#007700]; [/color][color=#0000bb]double b [/color][color=#007700]= [/color][color=#0000bb]4[/color][color=#007700]; [/color][color=#0000bb]double c [/color][color=#007700]= [/color][color=#0000bb]2[/color][color=#007700]; if([/color][color=#0000bb]a[/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]"day khong phai phuong trinh bac 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]"nghiem la: " [/color][color=#007700]+ (-[/color][color=#0000bb]c[/color][color=#007700]/[/color][color=#0000bb]b[/color][color=#007700])); }else { [/color][color=#0000bb]double delta [/color][color=#007700]= [/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]b [/color][color=#007700]- [/color][color=#0000bb]4[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700]; if([/color][color=#0000bb]delta [/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]"phuong trinh co 1 nghiem: " [/color][color=#007700]+ (-[/color][color=#0000bb]b[/color][color=#007700]/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]))); }else { if([/color][color=#0000bb]delta[/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]"nghiem x1: " [/color][color=#007700]+ ((-[/color][color=#0000bb]b [/color][color=#007700]+ [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]delta[/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]"nghiem x2: " [/color][color=#007700]+ ((-[/color][color=#0000bb]b [/color][color=#007700]- [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]delta[/color][color=#007700]))/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a[/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]"phuong trinh vo nghiem"[/color][color=#007700]); } } } }}[/color]
</div>
</div>
-
10-01-2013, 07:00 AM #20Junior Member
- Ngày tham gia
- Apr 2014
- Bài viết
- 0
mình ơi tam giác thường đâu
Biệt thự Para Draco chủ đầu tư Công Ty CP Đầu tư và Kinh Doanh Golf Long Thành dân cư dân trí giá hợp lý hiện đại đích thực. Para Draco Cam Ranh dân cư dân trí phong cách riêng ưu điểm gần sông....
Para Draco thoải mái thư giãn khu dân trí