JAVAÇó2¸öÊýµÄ×î´ó¹«Ô¼ÊýºÍ×îС¹«±¶Êý
//ÇóÁ½ÊýµÄ×î´ó¹«Ô¼ÊýºÍ×îС¹«±¶Êý
import java.util.*;
public class Dais02
{
public static void main(String args[])
{
int m,n;
Scanner s = new Scanner(System.in);
System.out.println("ÇëÊäÈëÄãÏëÒªÊÇÊý×Ö");
m = s.nextInt();
n = s.nextInt();
int total,r;
total = m*n;
do
{
if(m<n)
{
int t = m ;
m = n ;
n = t ;
}
r = m % n;
m = n ;
n = r ;
}while(r!=0);
System.out.println("×î´ó¹«ÒòÊýÊÇ£º"+m);
System.out.println("×îС¹«±¶ÊÇ£º"+total/m);
}
}
Ïà¹ØÎĵµ£º
½ñÌìÔÚÑо¿ÏîÄ¿ÖеÄÉè¼ÆË¼ÏëµÄʱºò£¬µÃ³öÒ»¸ö¶Ô½Ó¿ÚºÍ³éÏóÀà·Ç³£ÐÎÏóµÄÒ»¸ö±ÈÓ÷¡£
ËûÃǶ¼ÔÚ“½¨Öþ”ÖеÃÒÔÓ¦Ó㬽ӿھÍÏñ´óÂ¥µÄͼֽ£¬³éÏóÀà¾ÍÊÇ´óÂ¥µÄ¼Ü¹¹£¬Â¥²ã¾ÍÊÇÕæÕýµÄÀà¡£
ͼֻֽÊǹ滮³ö´óÂ¥µÄÑù×Ó£¬¹æ¶¨ÁËÒª×ö³ÉÉè¼ÆÑùʽ²ÅÄÜÕæÕý´òµ½Öî¶àЧ¹û£¬µ«ÊDz¢²»¹æ¶¨ÒªÈçºÎ¸Ç£¬¶ÔÂ¥²ãµÄÉè¼ÆÒ²²»¿¼ÂÇ£¬ÓÐÁËͼֽ£¬ ......
×÷ÕߣºÁõѧ³¬
×÷Õß¼ò½é
Áõѧ³¬£¬»ªÖÐʦ·¶´óѧ¼ÆËã»ú¿ÆÑ§ÏµÍøÂçÓëͨѶÑо¿Ëù£¬Äã¿ÉÒÔͨ¹ýshuechao_lau@hotmail.comÓëËûÁªÏµ¡£
1 ÒýÑÔ
JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø,ÀàµÄʵÀý(¶ÔÏó)´ÓÖзÖÅä¿Õ¼ä¡£JavaÐéÄâ»ú(JVM)µÄ¶ÑÖд¢´æ×ÅÕýÔÚÔËÐеÄÓ¦ÓóÌÐòËù½¨Á¢µÄËùÓжÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultiane ......
¿ìÅÅ£º¿ìËÙÅÅÐò£¬ÄѶȲ»ÊÇÌ«´ó£¬µ«ÊÇÊÇÎÒ¾³£°ÑÍæµÄС´úÂëÖ®Ò»£¬ÒýÓÿìÅÅ´úÂ봴ʼÈ˵ÄÒ»¾ä»°“Òª²»ÊǼòÁ·ÓÖÃ÷ÏÔûÓдíÎó£¬Òª²»ÊǸ´ÔÓûÓÐÃ÷ÏԵĴíÎó”
ÆðÒò£º
Ö÷ÒªÊÇǰһÕó¿´ÁõÈê¼ÑµÄ¡¶Ëã·¨ÒÕÊõÓëÐÅϢѧ¾ºÈü¡·P73Ò³£¬ÅöÇÉÎÒÓÖÇ×ÊÖдÁËÒ»±éÄÇÊéÉϵIJâÊÔÁËһϣ¬·¢ÏÖ¾¹È»ÊÇ´íÎóµÄ£¬È»ºóÎÒÓÖ²âÊÔÁËÒ»ÏÂÎÒÒÔÇ ......
JAVAºÍC++¶¼ÊÇÃæÏò¶ÔÏóÓïÑÔ¡£Ò²¾ÍÊÇ˵£¬ËüÃǶ¼Äܹ»ÊµÏÖÃæÏò¶ÔÏó˼Ï루·â×°£¬¼Ì³Ë£¬¶à̬£©¡£¶øÓÉÓÚc++ΪÁËÕչ˴óÁ¿µÄCÓïÑÔʹÓÃÕߣ¬¶ø¼æÈÝÁËC£¬Ê¹µÃ×ÔÉí½ö½ö³ÉΪÁË´øÀàµÄCÓïÑÔ£¬¶à¶àÉÙÉÙÓ°ÏìÁËÆäÃæÏò¶ÔÏóµÄ³¹µ×ÐÔ£¡JAVAÔòÊÇÍêÈ«µÄÃæÏò¶ÔÏóÓïÑÔ£¬Ëü¾ä·¨¸üÇåÎú£¬¹æÄ£¸üС£¬¸üÒ×ѧ¡£ËüÊÇÔÚ¶Ô¶àÖÖ³ÌÐòÉè¼ÆÓïÑÔ½øÐÐÁËÉîÈëϸÖÂÑо¿µ ......
ÿ¸ö³õѧÕß¶¼Ó¦¸Ã¸ã¶®µÄÎÊÌ⣡¶ÔÓÚÕâ¸öϵÁÐÀïµÄÎÊÌ⣬ÿ¸öѧJavaµÄÈ˶¼Ó¦¸Ã¸ã¶®¡£µ±È»£¬Èç¹ûÖ»ÊÇѧJavaÍæÍæ¾ÍÎÞËùνÁË¡£Èç¹ûÄãÈÏΪ×Ô¼ºÒѾ³¬Ô½³õѧÕßÁË£¬È´²»ºÜ¶®ÕâЩÎÊÌ⣬Ç뽫Äã×Ô¼ºÖعé³õѧÕßÐÐÁС£ÄÚÈݾùÀ´×ÔÓÚCSDNµÄ¾µäÀÏÌù¡£
ÎÊÌâÒ»£ºÎÒÉùÃ÷ÁËʲô£¡
String s = "Hello world!";
Ðí¶àÈ˶¼×ö¹ýÕâÑùµÄÊÂÇ飬µ«Ê ......