Isaguirre_Perfect.java - Isaguirre Daniel G WTHFS 1:30-6:00 import java.util.Scanner public class Isaguirre_Perfect public static void main(String args

Isaguirre_Perfect.java - Isaguirre Daniel G WTHFS 1:30-6:00...

This preview shows page 1 out of 1 page.

/** Isaguirre, Daniel G. WTHFS 1:30-6:00 */ import java.util.Scanner; public class Isaguirre_Perfect { public static void main(String[] args) { Scanner sc=new Scanner(System.in); //enter a number N System.out.print("Input N: "); //input n int n=sc.nextInt(); int i,sum=0; //This for loop will compute the sum of divisors of n. for(i=1;i<n;i++) { //If rem of n and i is zero, it will add to the sum

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture