Almost got no idea how to do this! Need some H E L P!

Can someone help me with my project. I'm a beginner when it comes to java and i picked the most complicated problem given by my instructor. Lend me some help i got no idea how to start this :((

https://www.facebook.com/notes/maron...51974110985111

Sorry if I\'m asking for this, i know this is too much by i really have no idea. I only finish some of programs like right triangle, diamond and perfect numbers. But this two difficult problems that i can\'t

understand well.

Re: Almost got no idea how to do this! Need some H E L P!

Could you maybe write it out, it is very hard to read now.

Re: Almost got no idea how to do this! Need some H E L P!

Re: Almost got no idea how to do this! Need some H E L P!

Thank you, i appreciate your concern about me although im not following instructions. Sorry because im not so good at english and programing also. This is my first to ask help in forum like this.

Re: Almost got no idea how to do this! Need some H E L P!

Quote:

Originally Posted by

**maronski**
... i picked the most complicated problem given by my instructor....

That makes no sense at all to me. Why not pick some less "complicated" problems and work your way up to the Good Stuff.

Quote:

Originally Posted by

**maronski**
no idea...

Just look the problem. Take it a step at a time. I assume that you can create text file that you can compile and execute with Java.

Then...

Code :

//Create a public class with whatever appropriate name you choose.
//Here's what goes in the class:
//Make three functions:
static int f1(int n)
{
// Calculate the sum of the first n integers.
// Maybe with a for(){} loop.
// Return the square of that sum.
} // End of f1()
static int f2(int n)
{
// Calculate the value of n times (n+1) divided by 2.
// Return that value.
} // End of f2()
static int f3(int n)
{
// Calculate the sum of the cubes of the first n integers.
// Maybe with a for(){} loop.
// Return that sum.
} // End of f3()
static void main(String [] args)
{
// Make a for(){} loop that lets an integer variable, n, go
// from 1 through 20.
//
// Here's the body of that loop.
//
BEGIN LOOP
// Declare integer variables sum1, sum2, sum3.
//
// Let sum1 = f1(n), sum2 = f2(n) and sum3 = f3(n).
//
// Print values of n, sum1, sum2, sum3.
END LOOP
} // End of main()

Cheers!

Z

Re: Almost got no idea how to do this! Need some H E L P!

Big help to start with. We're about to pick randomly by our instructor. I've just got no luck. By the way, thank you. Probably I'm not good at programming but it's required for us to do this. Thanks a lot.

Re: Almost got no idea how to do this! Need some H E L P!

Quote:

Originally Posted by

**Zaphod_b**
...

Code :

//Create a public class with whatever appropriate name you choose.
//Here's what goes in the class:
//Make three functions:
static int f1(int n)
{
// Calculate the sum of the first n integers.
// Maybe with a for(){} loop.
// Return the square of that sum.
} // End of f1()
static int f2(int n)
{
// Calculate the value of n times (n+1) divided by 2.
// Return that value.
} // End of f2()
static int f3(int n)
{
// Calculate the sum of the cubes of the first n integers.
// Maybe with a for(){} loop.
// Return that sum.
} // End of f3()
static void main(String [] args)
{
// Make a for(){} loop that lets an integer variable, n, go
// from 1 through 20.
//
// Here's the body of that loop.
//
BEGIN LOOP
// Declare integer variables sum1, sum2, sum3.
//
// Let sum1 = f1(n), sum2 = f2(n) and sum3 = f3(n).
//
// Print values of n, sum1, sum2, sum3.
END LOOP
} // End of main()

Cheers!

Z

Cool of you to take the time for that for someone

Two thumbs up for nice people