Search:

Type: Posts; User: anduril462

Search: Search took 0.04 seconds.

  1. Replies
    21
    Views
    4,821

    Gah! Why did you change i to num, and change the...

    Gah! Why did you change i to num, and change the if to "if (num)"? You were so close. You also still haven't rearranged the order of your assignments! For the THIRD AND FINAL TIME, GET THE BIGGER...
  2. Replies
    21
    Views
    4,821

    I took the code you posted, and made the edits...

    I took the code you posted, and made the edits you said you made, and everything looked fine. You know this wont work for single digit numbers, right? Can we get the full code and some sample input...
  3. Replies
    21
    Views
    4,821

    You had two erroneous semicolons. Did you get...

    You had two erroneous semicolons. Did you get both of them?
  4. Replies
    21
    Views
    4,821

    Try being a little more consistent and sensible...

    Try being a little more consistent and sensible about your { braces }. Pick a good indentation/brace style (K&R, 1TBS, Allman and BSD KNF are the most common). It might help to put braces around...
  5. Replies
    21
    Views
    4,821

    Since you're a noob, skip the weird ?: business...

    Since you're a noob, skip the weird ?: business for now. Stick with:


    if (a > b)
    i = a; // i is on the left, so we assign to i the value in a
    else
    i = b;

    Otherwise, i is...
  6. Replies
    21
    Views
    4,821

    Where did you put those statements? What was the...

    Where did you put those statements? What was the last value your program set the variable to before printing? You have to make your switch statements exclusive, i.e. don't do switch(tensDig) or...
  7. Replies
    21
    Views
    4,821

    How about printf(word);?

    How about printf(word);?
  8. Replies
    21
    Views
    4,821

    if (a>b){ a=i;} else b=i;...

    if (a>b){
    a=i;}
    else
    b=i;


    Just noticed this is backwards. You want i = a; and i = b; to make i contain the greater of the two. A shorthand for this common if-else...
  9. Replies
    21
    Views
    4,821

    [QUOTE=thomasjiii;1001990]I am making a program...

    [QUOTE=thomasjiii;1001990]I am making a program that will take any two two-digit numbers determine the largest and display it in words using if/else and switch statements. I'm kinda stuck. I know how...
Results 1 to 9 of 9