}
System.out.println(\¹²ÓÐ\¸öÈýλÊý\} }
¡¾³ÌÐò12¡¿
ÌâÄ¿£ºÆóÒµ·¢·ÅµÄ½±½ð¸ù¾ÝÀûÈóÌá³É¡£ÀûÈó(I)µÍÓÚ»òµÈÓÚ10ÍòԪʱ£¬½±½ð¿ÉÌá10%£»ÀûÈó¸ßÓÚ10ÍòÔª£¬µÍÓÚ20ÍòԪʱ£¬µÍÓÚ10ÍòÔªµÄ²¿·Ö°´10%Ìá³É£¬¸ßÓÚ10ÍòÔªµÄ²¿·Ö£¬¿É¿ÉÌá³É7.5%£»20Íòµ½40ÍòÖ®¼äʱ£¬¸ßÓÚ20ÍòÔªµÄ²¿·Ö£¬¿ÉÌá³É5%£»40Íòµ½60ÍòÖ®¼äʱ¸ßÓÚ40ÍòÔªµÄ²¿·Ö£¬¿ÉÌá³É3%£»60Íòµ½100ÍòÖ®¼äʱ£¬¸ßÓÚ60ÍòÔªµÄ²¿·Ö£¬¿ÉÌá³É1.5%£¬¸ßÓÚ100ÍòԪʱ£¬³¬¹ý100ÍòÔªµÄ²¿·Ö°´1%Ìá³É£¬´Ó¼üÅÌÊäÈëµ±ÔÂÀûÈó£¬ÇóÓ¦·¢·Å½±½ð×ÜÊý£¿
import java.util.*; public class lianxi12 {
public static void main(String[] args) { double x = 0,y = 0;
System.out.print(\ÊäÈëµ±ÔÂÀûÈó£¨Íò£©£º\ Scanner s = new Scanner(System.in); x = s.nextInt();
if(x > 0 && x <= 10) { y = x * 0.1;
} else if(x > 10 && x <= 20) { y = 10 * 0.1 + (x - 10) * 0.075; } else if(x > 20 && x <= 40) {
y = 10 * 0.1 + 10 * 0.075 + (x - 20) * 0.05; } else if(x > 40 && x <= 60) {
y = 10 * 0.1 + 10 * 0.075 + 20 * 0.05 + (x - 40) * 0.03; } else if(x > 60 && x <= 100) {
y = 20 * 0.175 + 20 * 0.05 + 20 * 0.03 + (x - 60) * 0.015; } else if(x > 100) {
y = 20 * 0.175 + 40 * 0.08 + 40 * 0.015 + (x - 100) * 0.01; }
System.out.println(\Ó¦¸ÃÌáÈ¡µÄ½±½ðÊÇ \Íò\} }
¡¾³ÌÐò13¡¿
ÌâÄ¿£ºÒ»¸öÕûÊý£¬Ëü¼ÓÉÏ100ºóÊÇÒ»¸öÍêȫƽ·½Êý£¬ÔÙ¼ÓÉÏ168ÓÖÊÇÒ»¸öÍêȫƽ·½Êý£¬ÇëÎʸÃÊýÊǶàÉÙ£¿
public class lianxi13 {
public static void main(String[] args) { for(int x =1; x<100000; x++) { if(Math.sqrt(x+100) % 1 == 0) { if(Math.sqrt(x+268) % 1 == 0) {
System.out.println(x + \¼Ó100ÊÇÒ»¸öÍêȫƽ·½Êý£¬ÔÙ¼Ó168ÓÖÊÇÒ»¸öÍêȫƽ·½Êý\ }
} } } }
/*°´ÌâÒâÑ»·Ó¦¸Ã´Ó-100¿ªÊ¼£¨ÕûÊý°üÀ¨ÕýÕûÊý¡¢¸ºÕûÊý¡¢Á㣩£¬ÕâÑù»á¶àÒ»¸öÂú×ãÌõ¼þµÄÊý-99¡£
µ«ÊÇÎÒ¿´µ½´ó²¿·ÖÈ˽âÕâµÀÌâĿʱ¶¼°ÑÌâÖеġ°ÕûÊý¡±Àí½â³ÉÕýÕûÊý£¬ÎÒÒ²¾ÍËæ´óÁ÷ÁË¡£*/ ¡¾³ÌÐò14¡¿
ÌâÄ¿£ºÊäÈëijÄêijÔÂijÈÕ£¬ÅжÏÕâÒ»ÌìÊÇÕâÒ»ÄêµÄµÚ¼¸Ì죿 import java.util.*; public class lianxi14 {
public static void main(String[] args) { int year, month, day; int days = 0; int d = 0; int e;
input fymd = new input(); do { e = 0;
System.out.print(\ÊäÈëÄ꣺\ year =fymd.input();
System.out.print(\ÊäÈëÔ£º\ month = fymd.input();
System.out.print(\ÊäÈëÌ죺\ day = fymd.input();
if (year < 0 || month < 0 || month > 12 || day < 0 || day > 31) { System.out.println(\ÊäÈë´íÎó£¬ÇëÖØÐÂÊäÈ룡\ e=1 ; }
}while( e==1);
for (int i=1; i case 9: case 11: days = 30; break; case 2: if ((year % 400 == 0) || (year % 4 == 0 && year % 100 != 0)) { days = 29; } else { days = 28; } break; } d += days; } System.out.println(year + \ÊÇÕâÄêµÄµÚ\Ìì¡£\} } class input{ public int input() { int value = 0; Scanner s = new Scanner(System.in); value = s.nextInt(); return value; } } ¡¾³ÌÐò15¡¿ ÌâÄ¿£ºÊäÈëÈý¸öÕûÊýx,y,z£¬Çë°ÑÕâÈý¸öÊýÓÉСµ½´óÊä³ö¡£ import java.util.*; public class lianxi15 { public static void main(String[] args) { input fnc = new input(); int x=0, y=0, z=0; System.out.print(\ÊäÈëµÚÒ»¸öÊý×Ö£º\ x = fnc.input(); System.out.print(\ÊäÈëµÚ¶þ¸öÊý×Ö£º\ y = fnc.input(); System.out.print(\ÊäÈëµÚÈý¸öÊý×Ö£º\ z = fnc.input(); if(x > y) { int t = x; x = y; y = t; } if(x > z) { int t = x; x = z; z = t; } if(y > z) { int t = y; y = z; z = t; } System.out.println( \Èý¸öÊý×ÖÓÉСµ½´óÅÅÁÐΪ£º \} } class input{ public int input() { int value = 0; Scanner s = new Scanner(System.in); value = s.nextInt(); return value; } } ¡¾³ÌÐò16¡¿ ÌâÄ¿£ºÊä³ö9*9¿Ú¾÷¡£ public class lianxi16 { public static void main(String[] args) { for(int i=1; i<10; i++) { for(int j=1; j<=i; j++) { System.out.print(j + \\ if(j*i<10){System.out.print(\} System.out.println(); } } } ¡¾³ÌÐò17¡¿ ÌâÄ¿£ººï×Ó³ÔÌÒÎÊÌ⣺ºï×ÓµÚÒ»ÌìÕªÏÂÈô¸É¸öÌÒ×Ó£¬µ±¼´³ÔÁËÒ»°ë£¬»¹²»ñ«£¬ÓÖ¶à³ÔÁËÒ»¸ö µÚ¶þÌìÔçÉÏÓÖ½«Ê£ÏµÄÌÒ×Ó³ÔµôÒ»°ë£¬ÓÖ¶à³ÔÁËÒ»¸ö¡£ÒÔºóÿÌìÔçÉ϶¼³ÔÁËǰһÌìʣϠµÄÒ»°ëÁãÒ»¸ö¡£µ½µÚ10ÌìÔçÉÏÏëÔÙ³Ôʱ£¬¼ûֻʣÏÂÒ»¸öÌÒ×ÓÁË¡£ÇóµÚÒ»Ìì¹²ÕªÁ˶àÉÙ¡£ public class lianxi17 { public static void main(String[] args) { int x = 1; for(int i=2; i<=10; i++) { x = (x+1)*2; } System.out.println(\ºï×ÓµÚÒ»ÌìÕªÁË \¸öÌÒ×Ó\