-
06-24-2013, 07:00 AM #31Junior Member
- Ngày tham gia
- Feb 2015
- Bài viết
- 0
nộp bài nào. có j mọi người nx nhé.<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 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]//bài 1 [/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]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]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]"phần nguyên khi chia lần lượt a/2, b/2 và c/2 là: " [/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]" và " [/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ư khi chia lần lượt a%3, b%3 và c%3 là: "[/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]" và " [/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]"giá trị các biến sau khi tăng là: a = " [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#dd0000]", b = " [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]+ [/color][color=#dd0000]" và c = " [/color][color=#007700]+ [/color][color=#0000bb]c [/color][color=#007700]); [/color][color=#ff8000]//bài 2 2ax + b = 8c [/color][color=#0000bb]float a1[/color][color=#007700],[/color][color=#0000bb]b1[/color][color=#007700],[/color][color=#0000bb]c1[/color][color=#007700],[/color][color=#0000bb]x[/color][color=#007700],[/color][color=#0000bb]t[/color][color=#007700]; [/color][color=#0000bb]a1 [/color][color=#007700]= [/color][color=#0000bb]1[/color][color=#007700]; [/color][color=#0000bb]b1 [/color][color=#007700]= [/color][color=#0000bb]5.2f[/color][color=#007700]; [/color][color=#0000bb]c1 [/color][color=#007700]= [/color][color=#0000bb]63[/color][color=#007700]; [/color][color=#0000bb]t [/color][color=#007700]= [/color][color=#0000bb]8[/color][color=#007700]*[/color][color=#0000bb]c1 [/color][color=#007700]- [/color][color=#0000bb]b1[/color][color=#007700]; [/color][color=#0000bb]x [/color][color=#007700]= [/color][color=#0000bb]t[/color][color=#007700]/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a1[/color][color=#007700]); if (([/color][color=#0000bb]a1 [/color][color=#007700]== [/color][color=#0000bb]0[/color][color=#007700])&&([/color][color=#0000bb]b1 [/color][color=#007700]== [/color][color=#0000bb]0[/color][color=#007700])&&([/color][color=#0000bb]c1 [/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 vô số nghiệm"[/color][color=#007700]); } else if ([/color][color=#0000bb]t [/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ó nghiệm duy nhất x = 0"[/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ó nghiệm là: "[/color][color=#007700]+ [/color][color=#0000bb]x[/color][color=#007700]); if([/color][color=#0000bb]a1 [/color][color=#007700]!= [/color][color=#0000bb]0[/color][color=#007700]){ [/color][color=#0000bb]int nghiemnguyen [/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]"nghiệm nguyên là: "[/color][color=#007700]+ [/color][color=#0000bb]nghiemnguyen[/color][color=#007700]); } [/color][color=#ff8000]//bài 3 [/color][color=#0000bb]float a2[/color][color=#007700],[/color][color=#0000bb]b2[/color][color=#007700],[/color][color=#0000bb]c2[/color][color=#007700]; [/color][color=#0000bb]a2 [/color][color=#007700]= [/color][color=#0000bb]4[/color][color=#007700]; [/color][color=#0000bb]b2 [/color][color=#007700]= [/color][color=#0000bb]3[/color][color=#007700]; [/color][color=#ff8000]//(float)(2*math.sqrt(2)); [/color][color=#0000bb]c2 [/color][color=#007700]= [/color][color=#0000bb]1[/color][color=#007700]; [/color][color=#0000bb]float cosa[/color][color=#007700], [/color][color=#0000bb]cosb[/color][color=#007700], [/color][color=#0000bb]cosc[/color][color=#007700], [/color][color=#0000bb]sina[/color][color=#007700], [/color][color=#0000bb]sinb[/color][color=#007700], [/color][color=#0000bb]sinc[/color][color=#007700], [/color][color=#0000bb]dientich[/color][color=#007700]; [/color][color=#0000bb]float goca[/color][color=#007700], [/color][color=#0000bb]gocb[/color][color=#007700], [/color][color=#0000bb]gocc[/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]"độ dài 3 cạnh tam giác là: bc = "[/color][color=#007700]+[/color][color=#0000bb]a2[/color][color=#007700]+[/color][color=#dd0000]", ac = "[/color][color=#007700]+[/color][color=#0000bb]b2[/color][color=#007700]+[/color][color=#dd0000]", ab = "[/color][color=#007700]+[/color][color=#0000bb]c2[/color][color=#007700]); if ([/color][color=#0000bb]a2 [/color][color=#007700]< ([/color][color=#0000bb]b2 [/color][color=#007700]+ [/color][color=#0000bb]c2[/color][color=#007700])||([/color][color=#0000bb]b2 [/color][color=#007700]< ([/color][color=#0000bb]a2 [/color][color=#007700]+ [/color][color=#0000bb]c2[/color][color=#007700]))||([/color][color=#0000bb]c2 [/color][color=#007700]< ([/color][color=#0000bb]a2 [/color][color=#007700]+ [/color][color=#0000bb]b2[/color][color=#007700]))){ [/color][color=#0000bb]float tua[/color][color=#007700], [/color][color=#0000bb]tub[/color][color=#007700], [/color][color=#0000bb]tuc[/color][color=#007700]; [/color][color=#0000bb]tua [/color][color=#007700]= ([/color][color=#0000bb]b2[/color][color=#007700]*[/color][color=#0000bb]b2 [/color][color=#007700]+ [/color][color=#0000bb]c2[/color][color=#007700]*[/color][color=#0000bb]c2 [/color][color=#007700]- [/color][color=#0000bb]a2[/color][color=#007700]*[/color][color=#0000bb]a2[/color][color=#007700]); [/color][color=#0000bb]tub [/color][color=#007700]= ([/color][color=#0000bb]a2[/color][color=#007700]*[/color][color=#0000bb]a2 [/color][color=#007700]+ [/color][color=#0000bb]c2[/color][color=#007700]*[/color][color=#0000bb]c2 [/color][color=#007700]- [/color][color=#0000bb]b2[/color][color=#007700]*[/color][color=#0000bb]b2[/color][color=#007700]); [/color][color=#0000bb]tuc [/color][color=#007700]= ([/color][color=#0000bb]b2[/color][color=#007700]*[/color][color=#0000bb]b2 [/color][color=#007700]+ [/color][color=#0000bb]a2[/color][color=#007700]*[/color][color=#0000bb]a2 [/color][color=#007700]- [/color][color=#0000bb]c2[/color][color=#007700]*[/color][color=#0000bb]c2[/color][color=#007700]); [/color][color=#0000bb]cosa [/color][color=#007700]= [/color][color=#0000bb]tua[/color][color=#007700]/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]b2[/color][color=#007700]*[/color][color=#0000bb]c2[/color][color=#007700]); [/color][color=#0000bb]cosb [/color][color=#007700]= [/color][color=#0000bb]tub[/color][color=#007700]/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a2[/color][color=#007700]*[/color][color=#0000bb]c2[/color][color=#007700]); [/color][color=#0000bb]cosc [/color][color=#007700]= [/color][color=#0000bb]tuc[/color][color=#007700]/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]b2[/color][color=#007700]*[/color][color=#0000bb]a2[/color][color=#007700]); [/color][color=#0000bb]goca [/color][color=#007700]= (float)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]acos[/color][color=#007700]([/color][color=#0000bb]cosa[/color][color=#007700]); [/color][color=#0000bb]gocb [/color][color=#007700]= (float)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]acos[/color][color=#007700]([/color][color=#0000bb]cosb[/color][color=#007700]); [/color][color=#0000bb]gocc [/color][color=#007700]= (float)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]acos[/color][color=#007700]([/color][color=#0000bb]cosc[/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ính cosa = " [/color][color=#007700]+ [/color][color=#0000bb]cosa [/color][color=#007700]+ [/color][color=#dd0000]", cosb = " [/color][color=#007700]+ [/color][color=#0000bb]cosb [/color][color=#007700]+ [/color][color=#dd0000]", cosc = " [/color][color=#007700]+ [/color][color=#0000bb]cosc [/color][color=#007700]+ [/color][color=#dd0000]"
"[/color][color=#007700]); if (([/color][color=#0000bb]cosc [/color][color=#007700]> [/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosc [/color][color=#007700]< -[/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosb [/color][color=#007700]> [/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosb [/color][color=#007700]< -[/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosa [/color][color=#007700]> [/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosa [/color][color=#007700]< -[/color][color=#0000bb]1[/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 không phải là 3 cạnh của tam giác"[/color][color=#007700]); } else if ((([/color][color=#0000bb]cosa [/color][color=#007700]== [/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosa [/color][color=#007700]== -[/color][color=#0000bb]1[/color][color=#007700]))&&(([/color][color=#0000bb]cosa [/color][color=#007700]== [/color][color=#0000bb]cosb[/color][color=#007700])||([/color][color=#0000bb]cosa [/color][color=#007700]== [/color][color=#0000bb]cosc[/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 không phải là 3 cạnh của tam giác"[/color][color=#007700]); } else if ((([/color][color=#0000bb]cosb [/color][color=#007700]== [/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosb [/color][color=#007700]== -[/color][color=#0000bb]1[/color][color=#007700]))&&(([/color][color=#0000bb]cosa [/color][color=#007700]== [/color][color=#0000bb]cosb[/color][color=#007700])||([/color][color=#0000bb]cosb [/color][color=#007700]== [/color][color=#0000bb]cosc[/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 không phải là 3 cạnh của tam giác"[/color][color=#007700]); } else if ((([/color][color=#0000bb]cosc [/color][color=#007700]== [/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosc [/color][color=#007700]== -[/color][color=#0000bb]1[/color][color=#007700]))&&(([/color][color=#0000bb]cosc [/color][color=#007700]== [/color][color=#0000bb]cosb[/color][color=#007700])||([/color][color=#0000bb]cosa [/color][color=#007700]== [/color][color=#0000bb]cosc[/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 không phải là 3 cạnh của tam giác"[/color][color=#007700]); } if (([/color][color=#0000bb]cosa [/color][color=#007700]> -[/color][color=#0000bb]1[/color][color=#007700])&&([/color][color=#0000bb]cosa [/color][color=#007700]< [/color][color=#0000bb]1[/color][color=#007700])){ [/color][color=#0000bb]sina [/color][color=#007700]= (float)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]1 [/color][color=#007700]- [/color][color=#0000bb]cosa[/color][color=#007700]*[/color][color=#0000bb]cosa[/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ính sina = " [/color][color=#007700]+ [/color][color=#0000bb]sina[/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]"góc a = " [/color][color=#007700]+ [/color][color=#0000bb]goca[/color][color=#007700]); if ((([/color][color=#0000bb]cosa [/color][color=#007700]== [/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosa [/color][color=#007700]== -[/color][color=#0000bb]1[/color][color=#007700]))&&(([/color][color=#0000bb]cosa [/color][color=#007700]!= [/color][color=#0000bb]cosb[/color][color=#007700])&&([/color][color=#0000bb]cosa [/color][color=#007700]!= [/color][color=#0000bb]cosc[/color][color=#007700])&&([/color][color=#0000bb]cosb [/color][color=#007700]!= [/color][color=#0000bb]cosc[/color][color=#007700]))){ if([/color][color=#0000bb]sina [/color][color=#007700]== [/color][color=#0000bb]1[/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]" --> tam giác vuông ở a"[/color][color=#007700]); [/color][color=#0000bb]dientich [/color][color=#007700]= [/color][color=#0000bb]b2[/color][color=#007700]*[/color][color=#0000bb]c2[/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]"--> diện tích tam giác là s = "[/color][color=#007700]+ [/color][color=#0000bb]dientich [/color][color=#007700]+ [/color][color=#dd0000]"
"[/color][color=#007700]); } } else{ [/color][color=#0000bb]dientich [/color][color=#007700]= [/color][color=#0000bb]sina[/color][color=#007700]*[/color][color=#0000bb]b2[/color][color=#007700]*[/color][color=#0000bb]c2[/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]"--> diện tích tam giác là s = "[/color][color=#007700]+ [/color][color=#0000bb]dientich [/color][color=#007700]+ [/color][color=#dd0000]"
"[/color][color=#007700]); } } if (([/color][color=#0000bb]cosb [/color][color=#007700]> -[/color][color=#0000bb]1[/color][color=#007700])&&([/color][color=#0000bb]cosb [/color][color=#007700]< [/color][color=#0000bb]1[/color][color=#007700])){ [/color][color=#0000bb]sinb [/color][color=#007700]= (float)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]1 [/color][color=#007700]- [/color][color=#0000bb]cosb[/color][color=#007700]*[/color][color=#0000bb]cosb[/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ính sinb = " [/color][color=#007700]+ [/color][color=#0000bb]sinb[/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]"góc b = " [/color][color=#007700]+ [/color][color=#0000bb]gocb[/color][color=#007700]); if ((([/color][color=#0000bb]cosa [/color][color=#007700]== [/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosa [/color][color=#007700]== -[/color][color=#0000bb]1[/color][color=#007700]))&&(([/color][color=#0000bb]cosa [/color][color=#007700]!= [/color][color=#0000bb]cosb[/color][color=#007700])&&([/color][color=#0000bb]cosa [/color][color=#007700]!= [/color][color=#0000bb]cosc[/color][color=#007700])&&([/color][color=#0000bb]cosb [/color][color=#007700]!= [/color][color=#0000bb]cosc[/color][color=#007700]))){ if([/color][color=#0000bb]sinb [/color][color=#007700]== [/color][color=#0000bb]1[/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]" --> tam giác vuông ở b"[/color][color=#007700]); [/color][color=#0000bb]dientich [/color][color=#007700]= [/color][color=#0000bb]a2[/color][color=#007700]*[/color][color=#0000bb]c2[/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]"--> diện tích tam giác là s = "[/color][color=#007700]+ [/color][color=#0000bb]dientich [/color][color=#007700]+ [/color][color=#dd0000]"
"[/color][color=#007700]); } } else{ [/color][color=#0000bb]dientich [/color][color=#007700]= [/color][color=#0000bb]sinb[/color][color=#007700]*[/color][color=#0000bb]a2[/color][color=#007700]*[/color][color=#0000bb]c2[/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]"--> diện tích tam giác là s = "[/color][color=#007700]+ [/color][color=#0000bb]dientich [/color][color=#007700]+ [/color][color=#dd0000]"
"[/color][color=#007700]); } } if(([/color][color=#0000bb]cosc [/color][color=#007700]> -[/color][color=#0000bb]1[/color][color=#007700])&&([/color][color=#0000bb]cosc [/color][color=#007700]< [/color][color=#0000bb]1[/color][color=#007700])){ [/color][color=#0000bb]sinc [/color][color=#007700]= (float)[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]1 [/color][color=#007700]- [/color][color=#0000bb]cosc[/color][color=#007700]*[/color][color=#0000bb]cosc[/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ính sinc = " [/color][color=#007700]+ [/color][color=#0000bb]sinc[/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]"góc c = " [/color][color=#007700]+ [/color][color=#0000bb]gocc[/color][color=#007700]); if ((([/color][color=#0000bb]cosa [/color][color=#007700]== [/color][color=#0000bb]1[/color][color=#007700])||([/color][color=#0000bb]cosa [/color][color=#007700]== -[/color][color=#0000bb]1[/color][color=#007700]))&&(([/color][color=#0000bb]cosa [/color][color=#007700]!= [/color][color=#0000bb]cosb[/color][color=#007700])&&([/color][color=#0000bb]cosa [/color][color=#007700]!= [/color][color=#0000bb]cosc[/color][color=#007700])&&([/color][color=#0000bb]cosb [/color][color=#007700]!= [/color][color=#0000bb]cosc[/color][color=#007700]))){ if([/color][color=#0000bb]sinc [/color][color=#007700]== [/color][color=#0000bb]1[/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]" --> tam giác vuông ở c"[/color][color=#007700]); [/color][color=#0000bb]dientich [/color][color=#007700]= [/color][color=#0000bb]b2[/color][color=#007700]*[/color][color=#0000bb]a2[/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]"--> diện tích tam giác là s = "[/color][color=#007700]+ [/color][color=#0000bb]dientich [/color][color=#007700]+ [/color][color=#dd0000]"
"[/color][color=#007700]); } } else{ [/color][color=#0000bb]dientich [/color][color=#007700]= [/color][color=#0000bb]sinc[/color][color=#007700]*[/color][color=#0000bb]b2[/color][color=#007700]*[/color][color=#0000bb]a2[/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]"--> diện tích tam giác là s = "[/color][color=#007700]+ [/color][color=#0000bb]dientich [/color][color=#007700]+ [/color][color=#dd0000]"
"[/color][color=#007700]); } } }[/color]
</div>
</div>
bạn để riêng từng bài ra cho dễ nhìn, dài quá nhắc mình lại mình nếu cần chấm điểm
tiasangmoi
-
06-24-2013, 07:00 AM #32Junior Member
- Ngày tham gia
- Jan 2015
- Bài viết
- 0
Gửi bởi trần văn chiến
-
06-24-2013, 07:00 AM #33Junior Member
- Ngày tham gia
- May 2015
- Bài viết
- 12
Gửi bởi dr.v
về công thức herong các bạn có thể tham khảo thêm tại đây
http://vi.wikipedia.org/wiki/công_thức_heron
-
06-26-2013, 07:00 AM #34Junior Member
- Ngày tham gia
- Jul 2015
- Bài viết
- 1
Gửi bởi shb1031993
-
06-26-2013, 07:00 AM #35Junior Member
- Ngày tham gia
- Sep 2014
- Bài viết
- 0
Gửi bởi gabk
-
06-26-2013, 07:00 AM #36Junior Member
- Ngày tham gia
- Mar 2014
- Bài viết
- 0
shb1031993: tối nay mình sẽ xem, mình đang bận ôn thi quá!
-
06-26-2013, 07:00 AM #37Junior Member
- Ngày tham gia
- Apr 2015
- Bài viết
- 0
Gửi bởi shb1031993
-
06-29-2013, 07:00 AM #38Junior Member
- Ngày tham gia
- Jun 2014
- Bài viết
- 0
Gửi bởi shb1031993
-
07-07-2013, 07:00 AM #39Junior Member
- Ngày tham gia
- Apr 2015
- Bài viết
- 0
phù phù song bài 1
Mã nguồn PHP:[color=#000000]
[/color][color=#ff8000]/** to change this template, choose tools | templates* and open the template in the editor.*/ /**** @author hai*/[/color][color=#007700]public class [/color][color=#0000bb]bai1 [/color][color=#007700]{ [/color][color=#ff8000]/** * * @param args */ [/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]10[/color][color=#007700]; [/color][color=#0000bb]b[/color][color=#007700]=[/color][color=#0000bb]11[/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]"phan nguyen khi chia a, b, c cho 2 lan luot 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]"phần dư khi chia a ,b,c cho 3 lần lượt là : "[/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]"sau khi tang 1 don vi : a= " [/color][color=#007700]+ (++[/color][color=#0000bb]a[/color][color=#007700]) + [/color][color=#dd0000]" b = " [/color][color=#007700]+ (++[/color][color=#0000bb]b[/color][color=#007700]) + [/color][color=#dd0000]" c = " [/color][color=#007700]+ (++[/color][color=#0000bb]c[/color][color=#007700])); } }[/color]
chấm điểm: 10 điểm
Mã nguồn PHP:[color=#000000]
[/color][color=#ff8000]/** to change this template, choose tools | templates* and open the template in the editor.*/[/color][color=#0000bb]package javacore[/color][color=#007700]; [/color][color=#ff8000]/**** @author hai*/[/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]float a [/color][color=#007700]= [/color][color=#0000bb]3[/color][color=#007700]*[/color][color=#0000bb]4f[/color][color=#007700], [/color][color=#0000bb]b[/color][color=#007700]=[/color][color=#0000bb]5[/color][color=#007700]*[/color][color=#0000bb]6f[/color][color=#007700], [/color][color=#0000bb]c[/color][color=#007700]=[/color][color=#0000bb]7[/color][color=#007700]*[/color][color=#0000bb]8f [/color][color=#007700], [/color][color=#0000bb]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]"kết quả x = " [/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]"ép kiểu x ra số thực x = " [/color][color=#007700]+ (int) [/color][color=#0000bb]x[/color][color=#007700]); } }[/color]
chấm điểm: 9 điểmdòng này của bạn là ý gì: float a = 3*4f, b=5*6f, c=7*8f , x ;bài 3 chịu chết vì chả nhớ công thức
bạn nên gộp các bài tập vào 1 bài viết thôi, dùng tính năng sửa nếu cần!người chấm điểm: tiasangmoi
-
07-09-2013, 07:00 AM #40Junior Member
- Ngày tham gia
- Jun 2014
- Bài viết
- 0
haith bài 3, bạn tham khảo công thức trên mạng, không tìm được thì nhìn bài mấy bạn trên, bạn nào điểm cao thì tham khảo
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