Trang 4 của 13 Đầu tiênĐầu tiên ... 23456 ... CuốiCuối
Kết quả 31 đến 40 của 128
  1. #31
    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] 
    </blockquote></div>
    </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

  2. #32
    Ngày tham gia
    Jan 2015
    Bài viết
    0
    Trích dẫn Gửi bởi trần văn chiến
    bai 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]float 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]chuvi[/color][color=#007700],[/color][color=#0000bb]dientich[/color][color=#007700]; [/color][color=#0000bb]chuvi [/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]color[/color][color=#007700]=[/color][color=#ff8000]#ff0000]dientich = math.sqrt(p*(p-a)*(p-b)*(p-c));[/color] [/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 la: "[/color][color=#007700]+[/color][color=#0000bb]dientich[/color][color=#007700]); [/color][color=#0000bb]double goca[/color][color=#007700], [/color][color=#0000bb]gocb[/color][color=#007700], [/color][color=#0000bb]gocc[/color][color=#007700]; [/color][color=#0000bb]goca [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]asin[/color][color=#007700]([/color][color=#0000bb]dientich[/color][color=#007700]/([/color][color=#0000bb]0.5[/color][color=#007700]*[/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700])); [/color][color=#0000bb]gocb [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]asin[/color][color=#007700]([/color][color=#0000bb]dientich[/color][color=#007700]/([/color][color=#0000bb]0.5[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700])); [/color][color=#0000bb]gocc [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]asin[/color][color=#007700]([/color][color=#0000bb]dientich[/color][color=#007700]/([/color][color=#0000bb]0.5[/color][color=#007700]*[/color][color=#0000bb]a[/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]"so do cua goc a la: "[/color][color=#007700]+[/color][color=#0000bb]todegrees[/color][color=#007700]([/color][color=#0000bb]goca[/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 cua goc b la: "[/color][color=#007700]+[/color][color=#0000bb]todegrees[/color][color=#007700]([/color][color=#0000bb]gocb[/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 cua goc c la: "[/color][color=#007700]+[/color][color=#0000bb]todegrees[/color][color=#007700]([/color][color=#0000bb]gocc[/color][color=#007700])); }}[/color] 
    </blockquote></div>
    </div>
    </div>
    p là chuvi đúng không bạn. code thế này k chạy được.

  3. #33
    Ngày tham gia
    May 2015
    Bài viết
    12
    Trích dẫn Gửi bởi dr.v
    p là chuvi đúng không bạn. code thế này k chạy được.
    p là nửa chu vi. ở đây bạn ấy tính diện tích tam giác theo công thức herong.
    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

  4. #34
    Ngày tham gia
    Jul 2015
    Bài viết
    1
    Trích dẫn Gửi bởi shb1031993
    bài 1:


    Mã nguồn PHP:
    [color=#000000]
    [/color][color=#007700]public class [/color][color=#0000bb]bai1 [/color][color=#007700]{ [/color][color=#ff8000]/** * @param args the command line arguments */ [/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]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]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"phần nguyên khi chia a, b, c cho 2 lần lượt là: " [/color][color=#007700]+ [/color][color=#0000bb]a[/color][color=#007700]/[/color][color=#0000bb]2 [/color][color=#007700]+ [/color][color=#dd0000]"\t" [/color][color=#007700]+ [/color][color=#0000bb]b[/color][color=#007700]/[/color][color=#0000bb]2 [/color][color=#007700]+ [/color][color=#dd0000]"\t" [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700]/[/color][color=#0000bb]2 [/color][color=#007700]+ [/color][color=#dd0000]"
    "[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/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]"\t" [/color][color=#007700]+ [/color][color=#0000bb]b[/color][color=#007700]%[/color][color=#0000bb]3 [/color][color=#007700]+ [/color][color=#dd0000]"\t" [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700]%[/color][color=#0000bb]3 [/color][color=#007700]+ [/color][color=#dd0000]"
    "[/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].print([/color][color=#dd0000]"
    giá trị a, b, c sau khi tăng 1 là: " [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#dd0000]"\t" [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]+ [/color][color=#dd0000]"\t" [/color][color=#007700]+ [/color][color=#0000bb]c [/color][color=#007700]+ [/color][color=#dd0000]"
    "[/color][color=#007700]); }}[/color] 
    bài 2:


    Mã nguồn PHP:
    [color=#000000]
    [/color][color=#007700]public class [/color][color=#0000bb]bai2 [/color][color=#007700]{ [/color][color=#ff8000]/** * @param args the command line arguments */ [/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 x[/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]2.1f[/color][color=#007700]; [/color][color=#0000bb]b [/color][color=#007700]= [/color][color=#0000bb]3.5f[/color][color=#007700]; [/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]4.5f[/color][color=#007700]; [/color][color=#0000bb]x [/color][color=#007700]= (float)([/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].print([/color][color=#dd0000]"giá trị của x = " [/color][color=#007700]+ [/color][color=#0000bb]x [/color][color=#007700]+ [/color][color=#dd0000]"
    "[/color][color=#007700]); [/color][color=#0000bb]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].print([/color][color=#dd0000]"giá trị của x sau khi ép kiểu = " [/color][color=#007700]+ [/color][color=#0000bb]x [/color][color=#007700]+ [/color][color=#dd0000]"
    "[/color][color=#007700]); }}[/color] 
    bài 3:


    Mã nguồn PHP:
    [color=#000000]
    [/color][color=#007700]public class [/color][color=#0000bb]bai3 [/color][color=#007700]{ [/color][color=#ff8000]/** * @param args the command line arguments */ [/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]3f[/color][color=#007700]; [/color][color=#0000bb]b [/color][color=#007700]= [/color][color=#0000bb]4f[/color][color=#007700]; [/color][color=#0000bb]c [/color][color=#007700]= [/color][color=#0000bb]5f[/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].print([/color][color=#dd0000]"diện tích tam giác abc : " [/color][color=#007700]+ [/color][color=#0000bb]s [/color][color=#007700]+ [/color][color=#dd0000]"
    "[/color][color=#007700]); [/color][color=#0000bb]double a [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]acos[/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]2[/color][color=#007700]*[/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700])); [/color][color=#0000bb]double b [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]acos[/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]b[/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]c[/color][color=#007700])); [/color][color=#0000bb]double c [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]acos[/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]c[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700])/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]b[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700])); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"góc a = " [/color][color=#007700]+ [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]todegrees[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700]) + [/color][color=#dd0000]" độ
    góc b
    = " [/color][color=#007700]+ [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]todegrees[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700]) + [/color][color=#dd0000]" độ
    góc c
    = " [/color][color=#007700]+ [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]todegrees[/color][color=#007700]([/color][color=#0000bb]c[/color][color=#007700]) + [/color][color=#dd0000]" độ
    "[/color][color=#007700]); }}[/color] 
    công thức tính góc mình tham khảo từ các bạn. mình tìm hoài mà không thấy.
    mong ad chấm dùm. :">
    ad hok chấm bài à :v

  5. #35
    Ngày tham gia
    Sep 2014
    Bài viết
    0
    Trích dẫn Gửi bởi gabk
    p là nửa chu vi. ở đây bạn ấy tính diện tích tam giác theo công thức herong.
    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
    ok bạn. nhưng bạn ý chưa khai báo "p" nên chắc là thiếu. :d

  6. #36
    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á!

  7. #37
    Ngày tham gia
    Apr 2015
    Bài viết
    0
    Trích dẫn Gửi bởi shb1031993
    ad hok chấm bài à :v
    bài của bạn thấy ổn rồi.

  8. #38
    Ngày tham gia
    Jun 2014
    Bài viết
    0
    Trích dẫn Gửi bởi shb1031993
    ad hok chấm bài à :v
    ok rồi bạn, thời gian vừa qua mình bận quá! :d

  9. #39
    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ểm
    dò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

  10. #40
    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

Trang 4 của 13 Đầu tiênĐầu tiên ... 23456 ... CuốiCuối

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •