ﺑﺮﻧﺎﻣﻪ ﺍﯼ ﺑﻨﻮﯾﺴﯿﺪ ﮐﻪ ﯾﮏ ﻋﺪﺩ ﺍﺯ ﮐﺎﺭﺑﺮ ﺩﺭﯾﺎﻓﺖ کند ومجموع مقسوم علیه های انرا بدست اورد
//Jame maghsoom aleyh haye yek adad //Java Programming //By: Faryadi //Website: Samiantec.ir import java.util.Scanner; public class Main { public static void main(String[] args) { int x,sum=0; System.out.print("Please enter a number: "); Scanner input=new Scanner(System.in); x = input.nextInt(); for (int i=1;i <= x;i++) { if (x % i == 0) { sum += i; } } System.out.print("The sum is : " + sum); } }