-
08-15-2013, 07:00 AM #51Junior Member
- Ngày tham gia
- Jun 2015
- Bài viết
- 1
Mã nguồn PHP:[color=#000000]
code[/color]
<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);
}
}
-
08-20-2013, 07:00 AM #52Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
Gửi bởi thuy_ja
-
08-20-2013, 07:00 AM #53Junior Member
- 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]
</div>
</div>
-
09-01-2013, 07:00 AM #54Junior Member
- 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]
</div>
</div>
Gửi bởi hohoaikiet
-
09-07-2013, 07:00 AM #55Banned
- 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); }
</div>
</div>
-
09-07-2013, 07:00 AM #56Junior Member
- 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); }
</div>
</div>
-
09-07-2013, 07:00 AM #57Junior Member
- 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); }
</div>
</div>
-
09-07-2013, 07:00 AM #58Junior Member
- 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]
</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]
</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]
</div>
</div>
-
09-09-2013, 07:00 AM #59Junior Member
- 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]
</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]
</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]
</div>
</div>
-
09-09-2013, 07:00 AM #60Junior Member
- Ngày tham gia
- Mar 2014
- Bài viết
- 0
Gửi bởi huongta
Khu dự án Diamond Alnata Plus phát triển bởi Gamuda Land thiết kế hợp lý nằm trung tâm thông gió tự nhiên. Diamond Alnata Plus Tân Phú thiết kế hợp lý sống đích thực ngay giữa trung tâm. Căn hộ cách...
Khu dự án Diamond Alnata Plus giáp trung tâm