zeroliken 79 Nearly a Posting Virtuoso
zeroliken 79 Nearly a Posting Virtuoso

i just need one like if a is greater than or equal to 70 it will stop ..

if you mean the condition at line 40 then it's because if any of the condition remains true then it will continue to loop (if any of the variables is less than or equal to 70)

zeroliken 79 Nearly a Posting Virtuoso

At line 9 change the sign from "&2s" to "%s"

zeroliken 79 Nearly a Posting Virtuoso

I may be complicating things here but as I understand your original requirements require that the original contents of each index should not be modified. Still the indeces' value will change if we were to use pass by reference or value such as swapping the values of the indeces.

The problem with linked list is it could be overkill to implement as a solution for your problem (e.g. keeping track of the head node), if this is homework you might want to clarify a few things before jumping to coding.

zeroliken 79 Nearly a Posting Virtuoso

are you familiar with using a runnable interface so you can continuously repaint the object?

on a side note... it might be my laziness talking but if it were me I'd just use several images of pacman pertaining to a direction instead of writing code to draw the shapes. Then I'd call and paint a selected image depending on which key is triggered

zeroliken 79 Nearly a Posting Virtuoso

just modify the pointer array so that the original content of the array will not be changed.

by this statement I was thinking of dynamically creating the array and linked them together so you can traverse and sort the array by modifying each nodes connection so there won't be a need to change the original values of each node

I had in mind something like this for array creation (note: just an example so it won't compile without errors):

typedef struct _array
{           
    int value;
}array;

/*  to create a linked list */
typedef struct _linked_list
{
    array sample;
    struct _linked_list *next;  
}*linked_list;

linked_list head = NULL;

int main(void){
    linked_list ptr = NULL;
    linked_list temp = NULL;
    int i;
    for (i = 0 ; i<5 ; i++){
    temp = NULL
        if(head == NULL){
            temp = malloc(sizeof(struct _linked_list));
            temp->sample.value = someValue; //get the value
            temp->next = NULL;
            ptr = head;
        }else{
            temp = malloc(sizeof(struct _linked_list));
            temp->sample.value = someValue; //get the value
            temp->next = NULL;
            ptr->next = temp; //link this node toprevious node
            ptr = ptr->next; //move to current node
        }
    }

    /*then implement a sorting algorithm where you manipulate the nodes' connection by changing where a nodes next pointer will connect*/

    return 0;
}
zeroliken 79 Nearly a Posting Virtuoso

are you using a linked list for that int array?

zeroliken 79 Nearly a Posting Virtuoso

I'm trying to figure out how to get it that if one of them or all of them or a few of them are equal to 0, how can I get it to not print them on the order form

try using different combinations for the variable's conditions so you can show specific results
e.g

if($LAPTOP!=0 && ( $MONITOR!=0 || $SOMETHING_ELSE!=0 ) ){
    echo "Laptop's value is not zero and either monitor or somethings else's value is not 0";
}
else if ( ($LAPTOP!=0 &&  $MONITOR!=0 ) || $SOMETHING_ELSE!=0 ) ){
    echo "either both monitor and Laptop's value is not zero or somethings else's value is not 0";
}

etc.

zeroliken 79 Nearly a Posting Virtuoso

how about printing those first two numbers before entering the loop since they're static output for all fibonacci cases

zeroliken 79 Nearly a Posting Virtuoso

hint: use simple if else or case conditions for the method or use regEx if you want to deviate from the norm a bit :)

zeroliken 79 Nearly a Posting Virtuoso

you forgot to post the error messages
So with just this code here's my comments
line 50: If this is an issue, I don't see a sqrt() method perhaps you want to use the Math.sqrt() method or is there one defined in the GeometricObject class?

Next (which is probably the main problem), your missing an operator between these parentheses (base2 - base1 )(base2-base1) on the same line 50.

zeroliken 79 Nearly a Posting Virtuoso

" optoin "
spell check

zeroliken 79 Nearly a Posting Virtuoso

your missing the starting curly brace of the main function

also will this program work correctly???

it "should" work but it doesn't match your requirements
at your loop you didn't prompt the user for input again

zeroliken 79 Nearly a Posting Virtuoso

*judging from recent posts

your array expects an integer and searchName is a String

zeroliken 79 Nearly a Posting Virtuoso

line 47 : at your function call your not using the array as your first parameter

zeroliken 79 Nearly a Posting Virtuoso

other than removing the unsupported conio.h from the code I was able to run the code completely without stopping at accepting input for friday... mayhaps you want to remove those unnecessary curly braces

zeroliken 79 Nearly a Posting Virtuoso

When printed, the weight is only the number calculated and not the weight minus the weight burned.

are you talking about variable weightLostEasyWO... i'm confused
if so the variable weightLostEasyWO scope only exists on that function, either make it a global variable or declare it at main and pass it by reference to the func., etc.
or it could be that in main your not saving the value returned by the function easyworkOut

also @ line 8 all code after the return statement will be ignored

zeroliken 79 Nearly a Posting Virtuoso

what's your question about the problem?

zeroliken 79 Nearly a Posting Virtuoso

(i am looking to a Java editor, if you guys know of one, tell me)

popular IDE's would be:

  • Netbeans (I most often use this since it's helped me in a lot of projects, used it in a long time to learn how to use it efficiently and I found it useful for other prog. languages related to my studies)
  • Eclipse
  • IntelliJ
zeroliken 79 Nearly a Posting Virtuoso

I see that you'll follow using Vmware as an alternative so just to give a possible answer for the first question, as a reference here's a link for a Windows installer for ubuntu called Wubi
http://www.ubuntu.com/download/desktop/windows-installer
and
https://wiki.ubuntu.com/WubiGuide for a config/installation guide

zeroliken 79 Nearly a Posting Virtuoso

It's been a lot of hours since you initally posted this and there hadn't been a reply pertaining to a possible solution to your problem so I guess it's time to say that you should try the minecraft forums, this should get a lot more attention there

zeroliken 79 Nearly a Posting Virtuoso

Do you have the latest version of flash installed and running as an add-on on IE9?

zeroliken 79 Nearly a Posting Virtuoso

The code you posted is different than the program details from your first post, care to explain?

zeroliken 79 Nearly a Posting Virtuoso

the first one checks for order if it's greater than, less than or equal to the object it is being compared with and returns a specified value given the result

the equals method checks for the equivalence of the objects with their values

the == works similarly as the equals method but it also checks wether the references to the object are equal

my opinion is since you only need to check if the list have duplicates the first option wouldn't be necessary
if the list contains elements that have primitive data types use '==' else use equals method
you can test each option and see for yourself which is appropriate, if you have doubts you can always check the API

zeroliken 79 Nearly a Posting Virtuoso

i think japple already has build in double buffering'

it's something you implement for your program
if you want a built in implementation you can use BufferStrategy

zeroliken 79 Nearly a Posting Virtuoso

I'm a bit confused on what you want, do you want to output a list of prime numbers whose range is upto the input or check if the input is a prime number or something else entirely?

zeroliken 79 Nearly a Posting Virtuoso
zeroliken 79 Nearly a Posting Virtuoso

When i create a window in netbeans, it actually creates a JPanel but not JFrame.

huh.. A JPanel instead of a JFrame?
Are you sure you used the Java Swing -> JFrame option when you created a new Java File

zeroliken 79 Nearly a Posting Virtuoso

you haven't started the thread, add this on your start method

Thread th = new Thread (this);
th.start();
zeroliken 79 Nearly a Posting Virtuoso

The list probably contains the recent active members or members with high amount of posts/ reputation/solved threads from the forum your most active with

zeroliken 79 Nearly a Posting Virtuoso

you can only have one public class present on a Java file where the public class must have the same name as the source file

zeroliken 79 Nearly a Posting Virtuoso

Could you tell us the problems, any error messages or runtime problem details

plus thats not an Applet thats a Swing

zeroliken 79 Nearly a Posting Virtuoso

I bet all Computer Science related courses would learn low level or machine level languanges in due time and in our university we used the portable 80x86 assembler NASM for our Assembly code

So here's my experimentation on how to use "functions" and recursion using a Fibonacci Solver as a test case
As you may notice the code only output the final outcome of the Fibonacci sequence instead of printing every number for all steps. I might or might not update this depending on my free time and motivation but for now here's what i've done :)

zeroliken 79 Nearly a Posting Virtuoso

so,if i add listener,then the SAVE button will be ok?

by okay, it means that when you'd add a listener you will execute whatever code you've written for the button's function whenever the button is pressed

Check the API and Java tutorials, it'll save you a lot of time

zeroliken 79 Nearly a Posting Virtuoso

Are you trying to get answers to your own questions?

Yes, most of the times I wonder if what I had in mind would be the best solution or answer for mine and other's problems

What value do you get from helping people?

I learn along the way as I help people

Has DaniWeb helped you forward your career?

It helped me broaden my mind for my education

Have DaniWeb community members evolved into quality online friends?

Daniweb has a lot of respectable members I look up to which I always enjoy reading their posts and learning from them

Have you ever done business with people you met on DaniWeb?

Not yet though I'm planning to if I ever get a lot of free time

zeroliken 79 Nearly a Posting Virtuoso

I notice you're exceptionally impatient. What's wrong with my answer?

My guess is obvious witty answers should be avoided :)

though too be honest when I saw the matrices, At first Glance they reminded me of reduced row echelon forms(though they're not the same) and using Gauss-Jordan Elimination and then I saw your post and it reminded me that simple problems have simple solutions... and that I read to much between the lines, took me a while to think things through

zeroliken 79 Nearly a Posting Virtuoso

how about dividing each element by the positive value of itself (other than the zeros)

zeroliken 79 Nearly a Posting Virtuoso

I'm assuming you're using the latest Version of Netbeans and you'd have used one the Swing GUI forms for the current file for your project

Other than the Source Code being next to the Design tab where you could simple Drag and Drop any Swing Components you could add and customize any events to it by right clicking the Jframe from the design or from the Navigator.

Also have you happen to do a Web search on how to do it with Netbeans or reading tutorials for it?

I've been using Netbeans A lot for Swings and it made my life A lot easier with the auto-generated code for my design

The only downside I see on using Netbeans is you wouldn't be able to run the code on all platforms since it uses Ant build for the generated Code where I'd have to edit it myself

zeroliken 79 Nearly a Posting Virtuoso

but when I run it the calculations aren't even performed

yes they are performed but you can't see the results since you don't print the variable you saved the value to after the calculation.

also remember that when you return a value from the method it returns the control to the calling method making your loop useless. Instead I suggest you use a loop at main

zeroliken 79 Nearly a Posting Virtuoso

Solve not just the problems today but also the problems of tomorrow today

zeroliken 79 Nearly a Posting Virtuoso

if you print the value of the variables before some of the condition statements you can find where the problem oocurs and check if the condition set or use of loop is wrong and make necessary changes

zeroliken 79 Nearly a Posting Virtuoso

i only need to determine the largest and samllest among them then display

you could do it by using a loop where you compare a current number from the next then replace it if the numbered compared is higher or lower until the last element to find highest or lowest number
or use a sorting algorithm (like a simple bubble sort should be fine for this) then you can print the beginning and end of the array where the highest and lowest number can be found

zeroliken 79 Nearly a Posting Virtuoso

%c only takes a single character so it takes the enter key pressed from the previous input from "scanf ("%d",&pbet);" , we put a space there to solve that

zeroliken 79 Nearly a Posting Virtuoso

you can see why it doesn't work if you print out the values of the variables before the conditions then you can make the right adjustments

zeroliken 79 Nearly a Posting Virtuoso

add a space before %c to catch the enter key pressed

scanf(" %c",&c);
zeroliken 79 Nearly a Posting Virtuoso

check win32 api or GTK+ for a tutorial

zeroliken 79 Nearly a Posting Virtuoso

variable total has no value, doesn't numScores represent the number of scores in the array?

zeroliken 79 Nearly a Posting Virtuoso

add all of the scores using a loop with a condition that it must not exceed the number of scores then divide the total value by the number of scores

it should look something similar to this

    for (int i = 0; i < TotalNumberofScores; i++){
            Sum += Scores[i];
    }
    Mean = Sum / TotalNumberofScores;
zeroliken 79 Nearly a Posting Virtuoso

your condition at line 27 is causing this, if your input is valid it will always pass the loop condition thus printing the menu again

zeroliken 79 Nearly a Posting Virtuoso

you haven't declared n1 to n5 as a variable at main, next create or use a previous variable that would accept the value returned by the maxValue function