I'm a total idiot -- For/Else/If Method? WHAT? [message #816963] |
Fri, 09 March 2012 08:20  |
Eclipse User |
|
|
|
Hello there intelligent people. My name's Vienne, I'm a starving Arts student. What is an General Arts student, with absolutely no knowledge of Computer Sciences (or anything with computers, actually...) doing in the Eclipse Community Fourm asking for help? Answer: She overestimated herself. That's why.
I self-taught myself HTML when I was elementary school and thought to myself. Damn. I must be so fricking gifted with these coding nonsense. I immediately took a Computer Science course as an elective, thinking it would be a GPA booster. And it was, at first, I had a lot of fun creating my own website providing dessert recipes. But then JAVA came and completely destroyed everything. Nothing makes sense to me. Can you guys help me out?
Quote:
import java.util.Scanner;
/*
*
*
* Description: Draws a X.
*/
public class Tutorial1
{ public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int i,j;
System.out.print("Enter size of box: 4 ");
int size = sc.nextInt();
for (i=0; i < size; i++)
{
for (j=0; j < size; j++)
{
if ( (i == 0) // First row
|| (i == size-1) // Last row
|| (j == 0) // First column
|| (j == size-1) ) // Last column
System.out.print("*"); // Draw star
else
System.out.print(" "); // Draw space
}
System.out.println();
}
}
} //
I can't even do the basics. What am I doing wrong?
I need to 1)Draw a "X" made up of stars (*). I must prompt for the width of the X in stars. My requirements for this assignment is:
+1 - prompt for size of X
+4 - draw X of stars (receive +2 if can draw solid square of stars)
|
|
|
Re: I'm a total idiot -- For/Else/If Method? WHAT? [message #816985 is a reply to message #816963] |
Fri, 09 March 2012 08:42  |
Eclipse User |
|
|
|
On 2012.03.09 6:20, Vienne Sung wrote:
> Hello there intelligent people. My name's Vienne, I'm a starving Arts
> student. What is an General Arts student, with absolutely no knowledge
> of Computer Sciences (or anything with computers, actually...) doing in
> the Eclipse Community Fourm asking for help? Answer: She overestimated
> herself. That's why.
> I self-taught myself HTML when I was elementary school and thought to
> myself. Damn. I must be so fricking gifted with these coding nonsense. I
> immediately took a Computer Science course as an elective, thinking it
> would be a GPA booster. And it was, at first, I had a lot of fun
> creating my own website providing dessert recipes. But then JAVA came
> and completely destroyed everything. Nothing makes sense to me. Can you
> guys help me out?
>[snip]
Vienne,
This forum is for questions about setting up and using the Eclipse IDE.
It is not for Java questions. The places to ask those include
javaranch.com, jguru.com and stackoverflow.com. There are others still,
but those are really good places, especially the first.
|
|
|
Powered by
FUDForum. Page generated in 0.08144 seconds