A
azur
Gast
Hallo,
ich möchte ein programm zur primfaktorzerlegung schreiben. Hier mein Quelltext:
Warum funxt das nicht??
cu azur
ich möchte ein programm zur primfaktorzerlegung schreiben. Hier mein Quelltext:
Code:
class primfaktorzerlegung{
public static void main (String[] args){
int x = 100;
int xalt = x;
boolean p=true;
int i;
int Rest;
for (int j=1; j<xalt; j++){
for(i=2;i<x;i++){
while (p = true){
Rest = x%i;
if (Rest == 0){
System.out.println(i);
p= true;
x=x/i;
}
else
p = false;
}
p = true;
}
}
}
}
Warum funxt das nicht??
cu azur