Recent content by Saterial

  1. S

    How to Choose the Right Proof Method for Mathematical Propositions?

    Homework Statement Prove the following propositions: 1) ∀x ∈ (0, 1), ∃y ∈ (0, 1), x < y and 2) ∀x, y ∈ R, if x < y, then ∀b ∈ (0, ∞), ∃a ∈ (0, ∞), x + ab < y. Can anyone help me out with either one? I have a few others that I can get but I can't get these two. Mainly because these don't...
  2. S

    Digital Design - decoders and multiplexer help

    So that would mean the output of y1 and y0 in my case is 1, 0 for 0, 0 ,0 0 in my case because the number of 1's is even and not odd?
  3. S

    Digital Design - decoders and multiplexer help

    Homework Statement Let f(x3; x2; x1; x0) = (y1; y0) such that y1 = 1 if the number of 1's in x3x2x1x0 is even, 0 otherwise, and, output y0 = 1 if the number of 1's in x3x2x1x0 is odd, 0 otherwise. 1. Implement f with four 2-to-4 decoders. 2. Implement f with a 4-to-1 multiplexer with selection...
  4. S

    How to Convert (1G8A.23) Base 17 to Base 15?

    I attempted it with decimal as the intermediate step. I can't figure out what I did wrong, I used an online converter that shows 1G8A = 9683 in base 10 = 2D08 in base 15. (Wouldn't let me use decimals). When I did my calculations I got: 1G8A.23 base 17 = 4913+4624+136+10 + 0.128 = 9683.128...
  5. S

    How to Convert (1G8A.23) Base 17 to Base 15?

    Homework Statement Convert (1G8A.23) base 17 into it's equivalent in base 15. Homework Equations The Attempt at a Solution How would I go about doing this? I haven't worked with letters yet so the only way I would know of is dividing 1G8A individually by the target base and...
  6. S

    Basic C Programming Help Cash Register

    Enter Item Code: 54199 Enter Quantity: 2 > Meats, pork, $1.99/lb @ 2.0 = $ 3.98 Enter Item Code: 55199 Enter Quantity: 2 > Meats, rabbit, $1.99/lb @ 2.0 = $ 3.98 Enter Item Code: 56199 <INVALID CODE, PLEASE TRY...
  7. S

    Basic C Programming Help Cash Register

    That will cause my print to not align to the right.
  8. S

    Basic C Programming Help Cash Register

    Err it didn't show that I mean I think : $ 8.99 : $8.99 How can I make it like the bottom one? %$15.2f obviously doesn't work, and $%15.2f doesn't include the $ sign in the alignment, which is what the top one is.
  9. S

    Basic C Programming Help Cash Register

    Aah, okay. Last thing that I wanted to ask was, how can I fix my alignment at the end? "%15.2f" would show a value aligned to the right of 15 spaces, how can I make it have a $ sign? I tried putting a $ sign after the conversion specifier but obviously that's an error. Right now it just...
  10. S

    Basic C Programming Help Cash Register

    Ahh thanks for all the input! I have everything fixed and running smoothly now. The last thing that I want to attempt to do, but is probably out of the scope of what I've learned so far is. When I use scanf, it waits for an integer. How can I make it so that if I type a character instead...
  11. S

    Basic C Programming Help Cash Register

    Oh wow, I'm an idiot! I figured it out. It was definitely a logical error. I had to removed all of the else statements because I basically made it, else the invalid code is STILL valid. Stupid of me. But now, I have a second issue. My exit code is 00 or 0, and now it's saying that 0 is an...
  12. S

    Basic C Programming Help Cash Register

    Yeah I caught that earlier, I changed it to || instead. Also I now added a printf like after EACH check of validation. It showed up as : The validCode is 0. The validCode is 1. The validCode is 1. The validCode is 1. The validCode is 1. So now it seems to me that although it does change the...
  13. S

    Basic C Programming Help Cash Register

    I actually just tried that and after each item code, it was coming out as "validCode = 1" every single time regardless of if it was a invalid code or not. I put "printf("The validCode is %d", validCode); and it always returned The validCode is 1. I can't figure out why it would not set...
  14. S

    Basic C Programming Help Cash Register

    Hello, I am working on a basic cash register c program and I've run into a few errors/logical errors I don't know where to begin to fix. I am limited to knowing only how to use, scant, printf, if/elseif/else, do/dowhile. The problem is if you compile it and test it, my validcode flag is not...
Back
Top