michaeljustman
Member
I'm pretty new to programming and I don't really frequent many forums where I can get this kind of help.
I can't for the life of me figure out why the println statements aren't working. It compiles fine.
I can't for the life of me figure out why the println statements aren't working. It compiles fine.
Code:
//Michael Justman
//IT210
//Module3: Programming Assignment 3 - Problem 1
class PA3_prob1
{
public static void main(String args[]) {}
Integer n;
Integer rtotal;
{
int n = (int)Math.floor(Math.random()*100000+1);
String randomString = String.valueOf(n);
for (int i=0;i<randomString.length();i++)
{
char c = randomString.charAt(i);
n = Character.valueOf(c);
rtotal =+ n;
}
System.out.println ("Random: " + randomString);
System.out.println ("Total: " + rtotal);
}
}