You are viewing our Forum Archives. To view or take place in current topics click here.
#871. Posted:
Status: Offline
Joined: Aug 24, 201014Year Member
Posts: 1,020
Reputation Power: 40
Status: Offline
Joined: Aug 24, 201014Year Member
Posts: 1,020
Reputation Power: 40
1.
class Amicable
2.
{
3.
public static void main(String[] args)
4.
{
5.
int num1=Integer.parseInt(args[0]);
6.
int num2=Integer.parseInt(args[1]);
7.
int sum1=0,sum2=0;
8.
for(int i=1;i<=num1;i++)
9.
{
10.
if(num1%i==0)
11.
sum1+=i;
12.
}
13.
for(int i=1;i<=num2;i++)
14.
{
15.
if(num2%i==0)
16.
sum2+=i;
17.
}
18.
if(sum1==sum2)
19.
System.out.println(num1+" and "+num2+" are Amicable numbers");
20.
else
21.
System.out.println(num1+" and "+num2+" are not Amicable numbers");
22.
}
23.
}
class Amicable
2.
{
3.
public static void main(String[] args)
4.
{
5.
int num1=Integer.parseInt(args[0]);
6.
int num2=Integer.parseInt(args[1]);
7.
int sum1=0,sum2=0;
8.
for(int i=1;i<=num1;i++)
9.
{
10.
if(num1%i==0)
11.
sum1+=i;
12.
}
13.
for(int i=1;i<=num2;i++)
14.
{
15.
if(num2%i==0)
16.
sum2+=i;
17.
}
18.
if(sum1==sum2)
19.
System.out.println(num1+" and "+num2+" are Amicable numbers");
20.
else
21.
System.out.println(num1+" and "+num2+" are not Amicable numbers");
22.
}
23.
}
- 0useful
- 0not useful
#872. Posted:
Status: Offline
Joined: Nov 17, 201014Year Member
Posts: 147
Reputation Power: 5
Status: Offline
Joined: Nov 17, 201014Year Member
Posts: 147
Reputation Power: 5
Then i can rub my little tash and say 'good job... GOOD JOB'
- 0useful
- 0not useful
#873. Posted:
Status: Offline
Joined: Mar 19, 201113Year Member
Posts: 269
Reputation Power: 9
Status: Offline
Joined: Mar 19, 201113Year Member
Posts: 269
Reputation Power: 9
iFusi8n
Answered a question about who trolls me.
Answered a question about who trolls me.
- 0useful
- 0not useful
#874. Posted:
Status: Offline
Joined: Apr 14, 201113Year Member
Posts: 1,244
Reputation Power: 66
INVedit
lmao, searchin google for a minecraft tool
lmao, searchin google for a minecraft tool
- 1useful
- 0not useful
#875. Posted:
Status: Offline
Joined: Nov 22, 201014Year Member
Posts: 431
Reputation Power: 17
Status: Offline
Joined: Nov 22, 201014Year Member
Posts: 431
Reputation Power: 17
expotent wrote Then i can rub my little tash and say 'good job... GOOD JOB'nice pic lmaooooo
- 0useful
- 0not useful
#876. Posted:
Status: Offline
Joined: Apr 05, 200915Year Member
Posts: 12,208
Reputation Power: 885
Status: Offline
Joined: Apr 05, 200915Year Member
Posts: 12,208
Reputation Power: 885
- 0useful
- 0not useful
#877. Posted:
Status: Offline
Joined: May 15, 201014Year Member
Posts: 2,295
Reputation Power: 105
Status: Offline
Joined: May 15, 201014Year Member
Posts: 2,295
Reputation Power: 105
#878. Posted:
Status: Offline
Joined: Oct 03, 201014Year Member
Posts: 1,794
Reputation Power: 92
Status: Offline
Joined: Oct 03, 201014Year Member
Posts: 1,794
Reputation Power: 92
we are on 1337 hr nuke and the xp sticks
that was mine lol
that was mine lol
- 0useful
- 0not useful
#879. Posted:
Status: Offline
Joined: Jun 13, 201014Year Member
Posts: 736
Reputation Power: 30
AMERICA, **** YEAH
^ LOL
^ LOL
- 0useful
- 0not useful
#880. Posted:
Status: Offline
Joined: Apr 18, 201113Year Member
Posts: 189
Reputation Power: 12
Status: Offline
Joined: Apr 18, 201113Year Member
Posts: 189
Reputation Power: 12
Redtube
Lol, I don't know xD.
Lol, I don't know xD.
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.