殇璃碎吧 关注:43贴子:2,558
rt


1楼2011-05-09 11:03回复
    →_→


    IP属地:辽宁来自手机贴吧2楼2011-05-09 11:03
    回复
      0.0


      来自手机贴吧3楼2011-05-09 11:04
      回复
        import javax.swing.JOptionPane;
        public class Output {
             public static void main( String arg[] )
             {
                 String input;
                 int number;
                
                 input = JOptionPane.showInputDialog("Enter integer:");
                 number = Integer.parseInt( input );
                
                 if( number != 7 )
                     System.out.println("Welcome");
                    
                 if((number % 5 ) == 0)
                     System.out.println("To Java Programming");
             }
        }


        4楼2011-05-09 11:04
        回复
          import javax.swing.JOptionPane;
          public class Miracle{
          public static void main( String arg[] )
          {
               String number;
               String result;
              
               int x;
              
               number = JOptionPane.showInputDialog( "Enter integer:" );
              
               x = Integer.parseInt( number );
              
              
               if ( x % 2 == 0 )
                   result ="Number is Miracle!";
                  
                  
               if ( x % 2 == 1 )
                   result ="Number is Even!";
                  
                  
                   JOptionPane.showMessgeDialog( null, result, "Result", JOptionPane.PLAIN_MESSAGE );
                  
                   System.exit(0);
          }
          }


          5楼2011-05-09 11:05
          回复
            我草


            来自手机贴吧6楼2011-05-09 11:05
            回复
              import javax.swing.JOptionPane;
              public class Calculate2{
                  
                   public static void main( String arg[] )
                   {
                       String firstNumber;
                       String secondNumber;
                       String thirdNumber;
                      
                       int number1;
                       int number2;
                       int number3;
                      
                       int sum;
                       int average;
                       int largest;
                       int product;
                       int smallest;
                      
                       firstNumber = JOptionPane.showInputDialog("no.1");
                       secondNumber = JOptionPane.showInputDialog("no.2");
                       thirdNumber = JOptionPane.showInputDialog("no.3");
                      
                       number1 = Integer.parseInt(firstNumber);
                       number2 = Integer.parseInt(secondNumber);
                       number3 = Integer.parseInt(thirdNumber);
                      
                       sum = number1 + number2 + number3;
                       average = sum/3;
                       product = number1*number2*number3;
                      
                       String result;
                       result = "For the numbers"+number1+","+number2+","+number3+"\n"+"The sum is"+sum+"\n"+"The product is"+product+"\n"+"The average is"+average;
                      
                      
                       JOptionPane.showMessageDialog(null,result,"Calculation Results",JOptionPane.INFORMATION_MESSAGE);
                      
                       System.exit(0);
                          
                   }
              }


              7楼2011-05-09 11:05
              回复
                import javax.swing.JOptionPane;
                public class area{
                     public static void main( String arg[] )
                {
                     String number;
                    
                    
                     double radius;
                     number = JOptionPane.showInputDialog( "Enter radius" );
                    
                     radius = Double.parseDouble( number );
                    
                    
                     String result;
                     result = "diameter is"+ 2*radius+ "\n" + "area is" + ( Math.PI*radius*radius ) + "\n" +"circumference is" + ( 2*Math.PI*radius );
                    
                     JOptionPane.showMessageDialog( null, result,"Calculation Results", JOptionPane.INFORMATION_MESSAGE );
                     System.exit(0);
                     }
                    
                }


                8楼2011-05-09 11:06
                回复
                  表示有学java的否?
                  来看看


                  9楼2011-05-09 11:06
                  回复
                              "Digits in " + originalNumber, JOptionPane.INFORMATION_MESSAGE );
                           System.exit( 0 );
                        }
                    } // end class Five
                    /*
                    **************************************************************************
                    * (C) Copyright 2002 by Deitel & Associates, Inc. and Prentice Hall.      *
                    * All Rights Reserved.                                                    *
                    *                                                                         *
                    * DISCLAIMER: The authors and publisher of this book have used their      *
                    * best efforts in preparing the book. These efforts include the           *
                    * development, research, and testing of the theories and programs         *
                    * to determine their effectiveness. The authors and publisher make        *
                    * no warranty of any kind, expressed or implied, with regard to these     *
                    * programs or to the documentation contained in these books. The authors *
                    * and publisher shall not be liable in any event for incidental or        *
                    * consequential damages in connection with, or arising out of, the        *
                    * furnishing, performance, or use of these programs.                      *
                    **************************************************************************
                    */


                    11楼2011-05-09 11:07
                    回复

                      import java.awt.*;
                      import javax.swing.*;
                      public class DrawRectangle2 extends JApplet {
                          int upperLeftX; // upper-left x coordinate
                          int upperLeftY; // upper-left y coordinate
                          int width;       // rectangle width
                          int height;      // rectangle height
                          {
                              String ux;
                              String uy;
                              String wh;
                              String ht;
                             
                              ux = JOptionPane.showInputDialog( "Enter the upperLeftX" );
                              uy = JOptionPane.showInputDialog( "Enter the upperLeftY" );
                              wh = JOptionPane.showInputDialog( "Enter the width" );
                              ht = JOptionPane.showInputDialog( "Enter the height" );
                             
                              upperLeftX = Integer.parseInt(ux);
                              upperLeftY = Integer.parseInt(uy);
                              width = Integer.parseInt(wh);
                              height = Integer.parseInt(ht);
                          }
                                  public void paint( Graphics g )
                          {
                             g.drawRect( upperLeftX, upperLeftY, width, height );
                          }
                      } 


                      12楼2011-05-09 11:08
                      回复
                        <html>
                        <applet code="DrawRectangle2.class"width="300"height="45">
                        </applet>
                        </html>


                        13楼2011-05-09 11:08
                        回复
                          = =程序盲路过……


                          IP属地:辽宁来自手机贴吧14楼2011-05-09 11:09
                          回复
                            昨天我就弄了这么点东西


                            15楼2011-05-09 11:11
                            回复
                              看不懂


                              来自手机贴吧16楼2011-05-09 11:12
                              回复