This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15894|Reply: 2

[Java Source Code] java from 1 to 100 source code

[Copy link]
Posted on 4/7/2015 9:25:30 PM | | |

  1. public class yy {

  2.         /**
  3.          * @param args
  4.          */
  5.         public static void main(String[] args) {
  6.                 // TODO Auto-generated method stub
  7.                 System.out.println(js());
  8.         }
  9.         public static int js(){
  10.                 int x=1;
  11.                 int sum=0;
  12.                 while(x<=100){
  13.                         sum+=x++;
  14.                 }
  15.                 return sum;
  16.         }

  17. }
Copy code






Previous:nginx server restart command, close
Next:Well, this is the legendary three-second boot
Posted on 11/8/2017 3:23:02 PM |
Yes, I learned
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com