import awt.*;
import .awt.event.*;
import .applet.*;
public class wangquanshu extends Applet implements ActionListener
{
int aa[]={6,28,496,8128,130816,2096128 ,33550336 },bb[]={0,0,0,0,0,0,0};
add(lab1);
add(text1);
add(lab2);
add(text2);
add(but);
but.addActionListener(this);
}
public void paint(Graphics g)
{int h;
h=50+20*m;
g.drawString(i,10,h);
}
public void actionPerformed(ActionEvent e)
{int s=0;
m=1;
int j=1;
int a=Integer.parseInt(text1.getText());
int b=Integer.parseInt(text2.getText());
for(i=a;i<=b;i++)
{for(j=1;j<i;j++)
if(i%j==0) s=s+j;
}
if(i==s)
m++;
repaint();
}
}
import .awt.event.*;
import .applet.*;
public class wangquanshu extends Applet implements ActionListener
{
int aa[]={6,28,496,8128,130816,2096128 ,33550336 },bb[]={0,0,0,0,0,0,0};
add(lab1);
add(text1);
add(lab2);
add(text2);
add(but);
but.addActionListener(this);
}
public void paint(Graphics g)
{int h;
h=50+20*m;
g.drawString(i,10,h);
}
public void actionPerformed(ActionEvent e)
{int s=0;
m=1;
int j=1;
int a=Integer.parseInt(text1.getText());
int b=Integer.parseInt(text2.getText());
for(i=a;i<=b;i++)
{for(j=1;j<i;j++)
if(i%j==0) s=s+j;
}
if(i==s)
m++;
repaint();
}
}