How do I create these Java programs?
I'm just wondering how I can create some of these Java programs. I'm not asking for a purpose of solutions just so I can use it to be famous for something I didn't create myself when it's whoever helps me who actually deserves the credit, or trying to get solutions for homework assignments or anything like that. It's not for homework or for getting me credit for something or anything else that's for cheating or taking advantage. I just am not good at creating Java programs, and I just wanna know how to do certain things, and wanna experiment with them, and I just don't know a thing I can do to create some of these Java programs. Anyways, here's some Java programs I wanna know codes for, just so I can, not just use them, but so I can compare and contrast pieces of the code that corresponds to the output I'm seeking, because that's my type of learning skills. Trial and error never works for me, so please just tell me the codes, and please don't think that I'm just giving excuses. Cuz I'm autistic, and I have some problems learning things by using strategies that most people use. That's all. I'm really good at algebra and geometry, but I'm confused with Java programming language. Anyways, here's the programs I wanna know how to create.
First, I wanna know how to create a program that asks you to put in an integer (including multi-digit integers), and then reads the integer that u type in, and prints out 3 things at once, each one in a separate line: The most significant digit, the largest digit, and the sum of all digits. Like suppose I type in 158724, it will show this output with 3 rows, the first row saying "Most significant digit: 1", the second row saying "Largest digit: 8", and the last row saying "Sum of digits: 27".
The next thing I wanna know is how to create a Java program that reads a sequence of positive integers entered one per line, and then it will stop reading if "0" is entered, and the output will be the sum of squares. Like suppose I enter 2, then it will tell me to enter another positive integer, and suppose I enter 7, then it will ask me again to enter another, and suppose I enter 3, then it will ask me to enter another, and suppose I enter 5, then it will ask me to enter another, and suppose I enter 0, then it will stop asking me to enter numbers and then show an output saying "Sum of squares: 87". All I know (from common sense) is that I should use a while loop like "stdin.readLine( )", while the proper condition in order for me to break the while loop must probably be "input integer == 0". But I still don't know where in such code I put those things in, since Java programming language is confusing to me. So I need lots of help please.
And the last thing I wanna know is how to write a Java program that'll ask me to enter 3 integers, and after I do so, then it will compare the values, and then will show an output that shows the largest and smallest integers. Like suppose I enter 59, 40, and 158, then it'll say "The largest is 158 and the smallest is 40".
And that's all for now. I really would appreciate the help. Especially helping me by giving the details I'm looking for, after I just promised that I'm not asking for this because I wanna use other peoples' knowledge to make me famous or whatever even though u deserve the credit, or for stuff having to do with homework. Thanks.
Re: How do I create these Java programs?
Not sure if you're being serious, but If you want to get stuck into Java, you can't come and request code for every little project which you find intriguing.
I suggest you start reading:
Trail: Getting Started (The Java™ Tutorials)
Re: How do I create these Java programs?
You might be mistaken that these forums are a code service. I doubt anyone will spend their free (and unpaid) time doing this. My recommendation is, if this is your style of learning and you really wish to learn the language a) Read, study, and study again the tutorials already linked above and/or b) get a tutor to lead you through the process and customize your studies to fit your needs.