1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
|
public class agent {
public static void main(String[] args) {
String pattern="000"; //um Agent001 einzustellen
DecimalFormat form = new DecimalFormat(pattern);
for(int i= 1; i<1000; i++)
{
System.out.println();
System.out.print("Agent"+form.format(i));
if("Agent007".equals("Agent"+form.format(i)))
{
System.out.print("\t James Bond");
}
if(i%4 == 0)
{
System.out.print("\t entarnt");
}
}
}
}
|