Any java fags willing to help a newbie out?

Any java fags willing to help a newbie out?

need to make a magic squares shit but mine is working correctly.

Other urls found in this thread:

stackoverflow.com/questions/28203246/magic-square-code-java
twitter.com/NSFWRedditGif

I can only post code parts at a time but here I go.

import java.util.Scanner;
public class MagicSquare
{
public static void main(String[] args)
{
int m, s;
int sumrow, sumcol, sumdiagonal = 0, sum = 0;
boolean magic=true;
int[][] square = new int[4][4];
Scanner input = new Scanner(System.in);

System.out.print("Enter numbers ");
for (m=0; m

Oh, good to hear it's working correctly OP.

for (m=1; m

fuck you know what I ment.

if (magic)
{
sumdiagonal = 0;
for (m=0; m

I'll help, what's wrong with your code. And what is a magic square?

Java is such a shit

In recreational mathematics, a magic square is an arrangement of distinct numbers (i.e. each number is used once), usually integers, in a square grid, where the numbers in each row, and in each column, and the numbers in the main and secondary diagonals, all add up to the same number.

Basically it keeps telling me it's not a magic square even when I put the numbers that are.

k

Doesn't make Java less shitty

>be a factory farm slave wagie because college said java is important
>program shitty java for toaster ovens
>can never do mission critical applications
>the most complex thing ever written in java was runescape

okkk

shitty mabye, useful definitely. personally i think one of those things outweighs the other but what do i know?

stackoverflow.com/questions/28203246/magic-square-code-java

>recreational mathematics

don't get hooked on this kids

>highest demand
>slave wages
Learn basic economics, please.
I have less than one year of experience and I'm already making $189,000/yr.

Honestly if you knew anything about programming you wouldn't be learning java, I'm just bumping the thread

so has nobody found out why my code doesn't work?

only useful thing was that link but I'm still lost.

have you tried looking up a youtube?

it seems you're relying on 'if, than' and there's probably a better way to do it

I need to use arrays to get credit so yes.

I thought we had another board for this

is there?

technology

try another Sup Forums thread maybe chose hentai as the post opener

there's always leddit, if you get desperate and don't mind even worse frustration