Trang 6 của 13 Đầu tiênĐầu tiên ... 45678 ... CuốiCuối
Kết quả 51 đến 60 của 128
  1. #51
    Ngày tham gia
    Jun 2015
    Bài viết
    1
    Mã nguồn PHP:
    [color=#000000]
    code[/color
    <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>
    public class baitap1 {
    public static void main(string[]args){
    int a, b ,c;
    a=9;
    b=17;
    c=15;
    system.out.println("a/2="+a/2);
    system.out.println("b/2="+b/2);
    system.out.println("c/2="+c/2);
    system.out.println("a%3="+a%3);
    system.out.println("b%3="+b%3);
    system.out.println("c%3="+c%3);
    system.out.println("
    ");
    a++;
    b++;
    c++;
    system.out.println("gia tri moi cua a la :"+a);
    system.out.println("gia tri moi cua b la:"+b);
    system.out.println("gia tri moi cua c la:"+c);
    }
    }

  2. #52
    Ngày tham gia
    Apr 2016
    Bài viết
    0
    Trích dẫn Gửi bởi thuy_ja
    nộp bài ^^
    bai3: loai hoai..du kieu moi xong phan tinh goc...hieu thuan toán nhưng chưa hiểu cái thư viện math để tính cos :-(
    bạn tham khảo bài của mấy bạn trên đấy! có nhiều bạn đã làm đúng, bên trang 1

  3. #53
    Ngày tham gia
    Jun 2014
    Bài viết
    0
    sao mình chạy mãi mà vẫn lỗi chỗ tính góc vậy, mọi người xem hộ mình xem sai chỗ nào với
    <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][[/color][color=#0000bb]code[/color][color=#007700]]public class [/color][color=#0000bb]bai4 [/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]// todo code application logic here [/color][color=#0000bb]int 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]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 các số 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]", " [/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]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ị mới sau khi tăng 3 biến lên 1: " [/color][color=#007700]+ [/color][color=#0000bb]a [/color][color=#007700]+ [/color][color=#dd0000]", " [/color][color=#007700]+ [/color][color=#0000bb]b [/color][color=#007700]+ [/color][color=#dd0000]", " [/color][color=#007700]+ [/color][color=#0000bb]c[/color][color=#007700]); [/color][color=#0000bb]a[/color][color=#007700]--; [/color][color=#0000bb]b[/color][color=#007700]--; [/color][color=#0000bb]c[/color][color=#007700]--; [/color][color=#0000bb]float x[/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].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"kết quả phép tính khi chưa ép kiểu là " [/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]"sau khi ép kiểu: " [/color][color=#007700]+ (int)[/color][color=#0000bb]x[/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]double s[/color][color=#007700]; [/color][color=#0000bb]s [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]p[/color][color=#007700]*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]a[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]b[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]c[/color][color=#007700])); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"diện tích tam giác là " [/color][color=#007700]+ [/color][color=#0000bb]s[/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]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]2[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]b[/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]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 c [/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]acos[/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]2[/color][color=#007700]*[/color][color=#0000bb]a[/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]"các góc của tam giác là " [/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]" độ,\t" [/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]" độ,\t" [/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][color=#0000bb]code[/color][color=#007700]][/color] 
    </blockquote></div>
    </div>
    </div>

  4. #54
    Ngày tham gia
    Mar 2015
    Bài viết
    0
    <div class="bbcodeblock bbcodequote bbcmspoilerblock">
    <div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>

    show spoiler
    hide spoiler

    </div>
    <div class="quotecontent">
    <div class="bbcm_spoiler_noscript"><blockquote>


    Mã nguồn PHP:
    [color=#000000]
    package structuredemo[/color][color=#007700]; public class [/color][color=#0000bb]unit1 [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string args [/color][color=#007700][]){ [/color][color=#0000bb]int 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]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"unit1: (a,b,c)/2= "[/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]"unit1: (a,b,c)%3= "[/color][color=#007700]+([/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]3[/color][color=#007700])+[/color][color=#dd0000]": "[/color][color=#007700]+([/color][color=#0000bb]b[/color][color=#007700]%[/color][color=#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]"unit1: going up 1:" [/color][color=#007700]+(++[/color][color=#0000bb]a[/color][color=#007700])+ [/color][color=#dd0000]", " [/color][color=#007700]+(++[/color][color=#0000bb]b[/color][color=#007700])+ [/color][color=#dd0000]", " [/color][color=#007700]+(++[/color][color=#0000bb]c[/color][color=#007700])); [/color][color=#0000bb]unit out [/color][color=#007700]= new [/color][color=#0000bb]unit[/color][color=#007700]();[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]unit2[/color][color=#007700]([/color][color=#0000bb]3[/color][color=#007700], [/color][color=#0000bb]4[/color][color=#007700], [/color][color=#0000bb]5[/color][color=#007700]);[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]unit3[/color][color=#007700]([/color][color=#0000bb]4[/color][color=#007700], [/color][color=#0000bb]5[/color][color=#007700], [/color][color=#0000bb]6[/color][color=#007700]); }[/color][color=#ff8000]//end the main.[/color][color=#007700]}[/color][color=#ff8000]// end the class dohomework. [/color][color=#007700]class [/color][color=#0000bb]unit [/color][color=#007700]{ public static [/color][color=#0000bb]void unit2[/color][color=#007700]([/color][color=#0000bb]float a[/color][color=#007700], [/color][color=#0000bb]float b[/color][color=#007700], [/color][color=#0000bb]float c[/color][color=#007700]) {[/color][color=#0000bb]float x[/color][color=#007700]; [/color][color=#ff8000]// 2ax+b=8c.[/color][color=#007700]if([/color][color=#0000bb]a[/color][color=#007700]!=[/color][color=#0000bb]0[/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]"unit2: x="[/color][color=#007700]+((int) [/color][color=#0000bb]x [/color][color=#007700]) );}else [/color][color=#ff8000]// a==0;[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"vo nghiem chang han!"[/color][color=#007700]);}[/color][color=#ff8000]//end the method unit2.. [/color][color=#007700]public static [/color][color=#0000bb]void unit3[/color][color=#007700]([/color][color=#0000bb]float a[/color][color=#007700], [/color][color=#0000bb]float b[/color][color=#007700], [/color][color=#0000bb]float c[/color][color=#007700]){ [/color][color=#0000bb]float p [/color][color=#007700]= ([/color][color=#0000bb]a[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700])/[/color][color=#0000bb]2[/color][color=#007700];[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"unit3: dientich= "[/color][color=#007700]+([/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]( [/color][color=#0000bb]p[/color][color=#007700]*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]a[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]b[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]c[/color][color=#007700]) ) ) );[/color][color=#0000bb]float 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]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]float 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]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]float 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]c[/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]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"unit3: ketqua="[/color][color=#007700]+([/color][color=#0000bb]a[/color][color=#007700])+ [/color][color=#dd0000]", "[/color][color=#007700]+([/color][color=#0000bb]b[/color][color=#007700])+ [/color][color=#dd0000]", " [/color][color=#007700]+([/color][color=#0000bb]c[/color][color=#007700]));}[/color][color=#ff8000]//end the method unit3.[/color][color=#007700]}[/color][color=#ff8000]//end the class unit2.[/color] 
    </blockquote></div>
    </div>
    </div>




    Trích dẫn Gửi bởi hohoaikiet
    <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]
    package structuredemo[/color][color=#007700]; public class [/color][color=#0000bb]unit1 [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string args [/color][color=#007700][]){ [/color][color=#0000bb]int 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]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"unit1: (a,b,c)/2= "[/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]"unit1: (a,b,c)%3= "[/color][color=#007700]+([/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]3[/color][color=#007700])+[/color][color=#dd0000]": "[/color][color=#007700]+([/color][color=#0000bb]b[/color][color=#007700]%[/color][color=#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]"unit1: going up 1:" [/color][color=#007700]+(++[/color][color=#0000bb]a[/color][color=#007700])+ [/color][color=#dd0000]", " [/color][color=#007700]+(++[/color][color=#0000bb]b[/color][color=#007700])+ [/color][color=#dd0000]", " [/color][color=#007700]+(++[/color][color=#0000bb]c[/color][color=#007700])); [/color][color=#0000bb]unit out [/color][color=#007700]= new [/color][color=#0000bb]unit[/color][color=#007700]();[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]unit2[/color][color=#007700]([/color][color=#0000bb]3[/color][color=#007700], [/color][color=#0000bb]4[/color][color=#007700], [/color][color=#0000bb]5[/color][color=#007700]);[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]unit3[/color][color=#007700]([/color][color=#0000bb]4[/color][color=#007700], [/color][color=#0000bb]5[/color][color=#007700], [/color][color=#0000bb]6[/color][color=#007700]); }[/color][color=#ff8000]//end the main.[/color][color=#007700]}[/color][color=#ff8000]// end the class dohomework. [/color][color=#007700]class [/color][color=#0000bb]unit [/color][color=#007700]{ public static [/color][color=#0000bb]void unit2[/color][color=#007700]([/color][color=#0000bb]float a[/color][color=#007700], [/color][color=#0000bb]float b[/color][color=#007700], [/color][color=#0000bb]float c[/color][color=#007700]) {[/color][color=#0000bb]float x[/color][color=#007700]; [/color][color=#ff8000]// 2ax+b=8c.[/color][color=#007700]if([/color][color=#0000bb]a[/color][color=#007700]!=[/color][color=#0000bb]0[/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]"unit2: x="[/color][color=#007700]+((int) [/color][color=#0000bb]x [/color][color=#007700]) );}else [/color][color=#ff8000]// a==0;[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"vo nghiem chang han!"[/color][color=#007700]);}[/color][color=#ff8000]//end the method unit2.. [/color][color=#007700]public static [/color][color=#0000bb]void unit3[/color][color=#007700]([/color][color=#0000bb]float a[/color][color=#007700], [/color][color=#0000bb]float b[/color][color=#007700], [/color][color=#0000bb]float c[/color][color=#007700]){ [/color][color=#0000bb]float p [/color][color=#007700]= ([/color][color=#0000bb]a[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700])/[/color][color=#0000bb]2[/color][color=#007700];[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"unit3: dientich= "[/color][color=#007700]+([/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]( [/color][color=#0000bb]p[/color][color=#007700]*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]a[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]b[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]c[/color][color=#007700]) ) ) );[/color][color=#0000bb]float 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]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]float 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]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]float 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]c[/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]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"unit3: ketqua="[/color][color=#007700]+([/color][color=#0000bb]a[/color][color=#007700])+ [/color][color=#dd0000]", "[/color][color=#007700]+([/color][color=#0000bb]b[/color][color=#007700])+ [/color][color=#dd0000]", " [/color][color=#007700]+([/color][color=#0000bb]c[/color][color=#007700]));}[/color][color=#ff8000]//end the method unit3.[/color][color=#007700]}[/color][color=#ff8000]//end the class unit2.[/color] 
    </blockquote></div>
    </div>
    </div>
    trót nghịch với mấy đoạn code. hề hề! cũng vui.

  5. #55
    Ngày tham gia
    Feb 2015
    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>
    <div class="quotecontent">
    <div class="bbcm_spoiler_noscript"><blockquote>


    Mã:
    public static void main(string[]args){
            int a,b,c;
            a=3;
            b=4;
            c=5;
            system.out.println("phan nguyen khi chia "+a+"/2=" +(a/2));
            system.out.println("phan nguyen khi chia "+b+"/2=" +(b/2));
            system.out.println("phan nguyen khi chia "+c+"/2=" +(c/2));
            system.out.println("phan du khi chia "+a+"/3=" +(a%3));
            system.out.println("phan du khi chia "+b+"/3=" +(b%3));
            system.out.println("phan du khi chia "+c+"/3=" +(c%3));
            ++a;
            ++b;
            ++c;
            system.out.println("gia tri a "+a);
            system.out.println("gia tri b "+b);
            system.out.println("gia tri c "+c);
        }
    </blockquote></div>
    </div>
    </div>

  6. #56
    Ngày tham gia
    Feb 2015
    Bài viết
    0
    bai 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ã:
    public static void main(string[]args){
            float a,b,c,x;
            a=3;
            b=4;
            c=5;
            x=(8*c-b)/(2*a);
            system.out.println("float x="+x);
            system.out.println("int x="+(int)x);
     
        }
    </blockquote></div>
    </div>
    </div>

  7. #57
    Ngày tham gia
    Nov 2014
    Bài viết
    0
    bai 03
    <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){
            float a,b,c,s;
            a=3;
            b=4;
            c=5;
            float p;
            p=(a+b+c)/2;
            s=(float) math.sqrt(p*(p-a)*(p-b)*(p-c));
            system.out.println("dien tich ="+s);
            float a,b,c;
            a=(float)math.asin((2*s)/(b*c));
            b=(float)math.asin((2*s)/(a*c));
            c=(float)math.asin((2*s)/(a*b));
            system.out.println("goc a="+(float)(a*180)/math.pi);
            system.out.println("goc b="+(float)(b*180)/math.pi);
            system.out.println("goc c="+(float)(c*180)/math.pi);
        }
    </blockquote></div>
    </div>
    </div>

  8. #58
    Ngày tham gia
    Apr 2016
    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]so1 [/color][color=#007700]{ public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string [/color][color=#007700][] [/color][color=#0000bb]agrs[/color][color=#007700]) { [/color][color=#0000bb]int a [/color][color=#007700]=[/color][color=#0000bb]3[/color][color=#007700]; [/color][color=#0000bb]int b[/color][color=#007700]=[/color][color=#0000bb]4[/color][color=#007700]; [/color][color=#0000bb]int c[/color][color=#007700]=[/color][color=#0000bb]5[/color][color=#007700]; [/color][color=#0000bb]int d[/color][color=#007700]= (int) [/color][color=#0000bb]a[/color][color=#007700]/[/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]int e[/color][color=#007700]= (int) [/color][color=#0000bb]b[/color][color=#007700]/[/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]int f[/color][color=#007700]= (int) [/color][color=#0000bb]c[/color][color=#007700]/[/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]int du1[/color][color=#007700]= [/color][color=#0000bb]a[/color][color=#007700]%[/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]int du2[/color][color=#007700]= [/color][color=#0000bb]b[/color][color=#007700]%[/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]int du3[/color][color=#007700]= [/color][color=#0000bb]c[/color][color=#007700]%[/color][color=#0000bb]2[/color][color=#007700];[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"phân nguyên phép chia a/2: "[/color][color=#007700]+[/color][color=#0000bb]d[/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 phép chia b/2: "[/color][color=#007700]+[/color][color=#0000bb]e[/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 phép chia c/2: "[/color][color=#007700]+[/color][color=#0000bb]f[/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ư phép chia a/2: "[/color][color=#007700]+[/color][color=#0000bb]du1[/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ư phép chia b/2: "[/color][color=#007700]+[/color][color=#0000bb]du2[/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ư phép chia c/2: "[/color][color=#007700]+[/color][color=#0000bb]du3[/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]"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] 
    </blockquote></div>
    </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]so2 [/color][color=#007700]{ public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]agrs[/color][color=#007700]) { [/color][color=#0000bb]float a [/color][color=#007700]= [/color][color=#0000bb]3[/color][color=#007700]; [/color][color=#0000bb]float b [/color][color=#007700]= [/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]float c [/color][color=#007700]= [/color][color=#0000bb]5[/color][color=#007700]; [/color][color=#0000bb]float 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]"nghiêm của pt 2ax+b=8c là: 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]"x được ép kiểu về số nguyên : x = " [/color][color=#007700]+ (int) [/color][color=#0000bb]x[/color][color=#007700]); } }[/color] 
    </blockquote></div>
    </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]so3 [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][][/color][color=#0000bb]agrs[/color][color=#007700]) { [/color][color=#0000bb]float a[/color][color=#007700]=[/color][color=#0000bb]3[/color][color=#007700]; [/color][color=#0000bb]float b[/color][color=#007700]=[/color][color=#0000bb]4[/color][color=#007700]; [/color][color=#0000bb]float c[/color][color=#007700]=[/color][color=#0000bb]5[/color][color=#007700]; [/color][color=#0000bb]float p[/color][color=#007700]=([/color][color=#0000bb]a[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700])/[/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]double s[/color][color=#007700]= [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]p[/color][color=#007700]*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]a[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]b[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]c[/color][color=#007700])); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"dien tich tam giac la s= "[/color][color=#007700]+[/color][color=#0000bb]s[/color][color=#007700]); [/color][color=#0000bb]double a[/color][color=#007700]=[/color][color=#0000bb]180[/color][color=#007700]*([/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]asin[/color][color=#007700]([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]s[/color][color=#007700]/([/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]b[/color][color=#007700])))/[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]pi[/color][color=#007700]; [/color][color=#0000bb]double b[/color][color=#007700]=[/color][color=#0000bb]180[/color][color=#007700]*([/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]asin[/color][color=#007700]([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]s[/color][color=#007700]/([/color][color=#0000bb]a[/color][color=#007700]*[/color][color=#0000bb]c[/color][color=#007700])))/[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]pi[/color][color=#007700]; [/color][color=#0000bb]double c[/color][color=#007700]=[/color][color=#0000bb]180[/color][color=#007700]*([/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]asin[/color][color=#007700]([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]s[/color][color=#007700]/([/color][color=#0000bb]c[/color][color=#007700]*[/color][color=#0000bb]b[/color][color=#007700])))/[/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]pi[/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]"3 goc tam giac la :" [/color][color=#007700]+[/color][color=#0000bb]a [/color][color=#007700]+[/color][color=#dd0000]" "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]+[/color][color=#dd0000]" "[/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700]); }}[/color] 
    </blockquote></div>
    </div>
    </div>

  9. #59
    Ngày tham gia
    Jan 2015
    Bài viết
    0
    nộp bài:

    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]
    package bai1[/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]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]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 cho 2 của a, b, c 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]", " [/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 cho 3 của a, b, c 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]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ị a, b, c sau khi tăng: " [/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700]+[/color][color=#dd0000]", "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]+[/color][color=#dd0000]", " [/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700]); }}[/color] 
    </blockquote></div>
    </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]
    package bai2[/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]2[/color][color=#007700], [/color][color=#0000bb]b[/color][color=#007700]=[/color][color=#0000bb]3[/color][color=#007700], [/color][color=#0000bb]c[/color][color=#007700]=[/color][color=#0000bb]4[/color][color=#007700], [/color][color=#0000bb]x[/color][color=#007700]; [/color][color=#0000bb]int ex[/color][color=#007700]; [/color][color=#0000bb]x [/color][color=#007700]= ([/color][color=#0000bb]8[/color][color=#007700]*[/color][color=#0000bb]c [/color][color=#007700]- [/color][color=#0000bb]b[/color][color=#007700])/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giá trị x là: "[/color][color=#007700]+[/color][color=#0000bb]x[/color][color=#007700]); [/color][color=#0000bb]ex [/color][color=#007700]= (int) [/color][color=#0000bb]x[/color][color=#007700]; [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giá trị x sau khi ép kiểu: "[/color][color=#007700]+[/color][color=#0000bb]ex[/color][color=#007700]); }}[/color] 
    </blockquote></div>
    </div>
    </div>

    bài 3: tính góc ko biết làm tới:d
    <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]
    package bai3[/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]s[/color][color=#007700], [/color][color=#0000bb]cv[/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]b[/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700])/[/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]s [/color][color=#007700]= (float) [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]p[/color][color=#007700]*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]a[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]b[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]c[/color][color=#007700])); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"diện tích tam giác là: "[/color][color=#007700]+[/color][color=#0000bb]s[/color][color=#007700]); } }[/color] 
    </blockquote></div>
    </div>
    </div>

  10. #60
    Ngày tham gia
    Mar 2014
    Bài viết
    0
    Trích dẫn Gửi bởi huongta
    nộp bài:

    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]
    package bai1[/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]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]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 cho 2 của a, b, c 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]", " [/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 cho 3 của a, b, c 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]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ị a, b, c sau khi tăng: " [/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700]+[/color][color=#dd0000]", "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700]+[/color][color=#dd0000]", " [/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700]); }}[/color] 
    </blockquote></div>
    </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]
    package bai2[/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]2[/color][color=#007700], [/color][color=#0000bb]b[/color][color=#007700]=[/color][color=#0000bb]3[/color][color=#007700], [/color][color=#0000bb]c[/color][color=#007700]=[/color][color=#0000bb]4[/color][color=#007700], [/color][color=#0000bb]x[/color][color=#007700]; [/color][color=#0000bb]int ex[/color][color=#007700]; [/color][color=#0000bb]x [/color][color=#007700]= ([/color][color=#0000bb]8[/color][color=#007700]*[/color][color=#0000bb]c [/color][color=#007700]- [/color][color=#0000bb]b[/color][color=#007700])/([/color][color=#0000bb]2[/color][color=#007700]*[/color][color=#0000bb]a[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giá trị x là: "[/color][color=#007700]+[/color][color=#0000bb]x[/color][color=#007700]); [/color][color=#0000bb]ex [/color][color=#007700]= (int) [/color][color=#0000bb]x[/color][color=#007700]; [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giá trị x sau khi ép kiểu: "[/color][color=#007700]+[/color][color=#0000bb]ex[/color][color=#007700]); }}[/color] 
    </blockquote></div>
    </div>
    </div>

    bài 3: tính góc ko biết làm tới:d
    <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]
    package bai3[/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]s[/color][color=#007700], [/color][color=#0000bb]cv[/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]b[/color][color=#007700]+[/color][color=#0000bb]c[/color][color=#007700])/[/color][color=#0000bb]2[/color][color=#007700]; [/color][color=#0000bb]s [/color][color=#007700]= (float) [/color][color=#0000bb]math[/color][color=#007700].[/color][color=#0000bb]sqrt[/color][color=#007700]([/color][color=#0000bb]p[/color][color=#007700]*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]a[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]b[/color][color=#007700])*([/color][color=#0000bb]p[/color][color=#007700]-[/color][color=#0000bb]c[/color][color=#007700])); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"diện tích tam giác là: "[/color][color=#007700]+[/color][color=#0000bb]s[/color][color=#007700]); } }[/color] 
    </blockquote></div>
    </div>
    </div>
    goc a=arcsin(2*s/(a*b)) ( = radian)

Trang 6 của 13 Đầu tiênĐầu tiên ... 45678 ... 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
  •