123456789101112131415161718192021
  1. /**
  2. * Created by iyasuwatts on 10/17/17.
  3. */
  4. public class Main {
  5. private int sum;
  6. public static void main(String[] args){
  7. }
  8. public int userNum(int n) {
  9. sum = 0;
  10. for(int i=0; i <=n; n++) {
  11. sum = sum + i;
  12. }
  13. return sum;
  14. }
  15. }