Search:

Type: Posts; User: quintenmater

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. yes :)

    yes :)
  2. Replies
    12
    Views
    2,283

    The numbers aren't changing now when I recompile....

    The numbers aren't changing now when I recompile. I'm getting the same results each time. Any reason?



    #include <stdio.h>
    #include <stdlib.h>

    int main(void){
    int numHeadsThisTime,...
  3. Replies
    12
    Views
    2,283

    Thanks I made those changes but what does...

    Thanks I made those changes but what does printf("%2d: "); do
  4. Replies
    12
    Views
    2,283

    It works- just wondering why its only printing...

    It works- just wondering why its only printing 999 trials. New code:


    #include <stdio.h>
    #include <stdlib.h>

    int main(void){
    int numHeadsThisTime, trialNumber, flipNumber, flips[11];
    ...
  5. Replies
    12
    Views
    2,283

    Sorry, not meaning to leave a bunch of comments...

    Sorry, not meaning to leave a bunch of comments just slowly figuring things out. Why doesn't the following program work:



    #include <stdio.h>
    #include <stdlib.h>


    int main(void){
    int...
  6. Replies
    12
    Views
    2,283

    Ahhh- flips[numHeadsThisTime]++ increments the...

    Ahhh- flips[numHeadsThisTime]++ increments the occurrences into the arrays doesnt it? now I just need to figure out how to print out what is within each array but only one star for each ten...
  7. Replies
    12
    Views
    2,283

    This is what I am having a hard time wrapping my...

    This is what I am having a hard time wrapping my head around: each trial has ten flips of the coin and the number of heads that come up store into "numHeadsThisTime." How do I then take that number...
  8. Replies
    12
    Views
    2,283

    Is "i" "flipNumber" here or are these two new...

    Is "i" "flipNumber" here or are these two new loops?

    Is flips[i] supposed to be flips[flipNumber]?
  9. Replies
    12
    Views
    2,283

    I've got the following so far but am sort of...

    I've got the following so far but am sort of confused what I am doing with the "flips[numHeadsThisTime]++" and really confused how I am supposed to print this out.




    #include <stdio.h>...
  10. Replies
    12
    Views
    2,283

    Binomial Simulation

    I have a project for school in which I have to write a program based on probability where a "coin" is flipped 10,000 times. The 10,000 flips are divided into 1,000 trials of 10 flips each. I'm stuck...
  11. Replies
    13
    Views
    13,603

    Also, could I condense the first two switch...

    Also, could I condense the first two switch statements? like switch(value1&&value2)??
  12. Replies
    13
    Views
    13,603

    I'm now trying to do the extra credit : Make the...

    I'm now trying to do the extra credit : Make the program loop, asking for input and processing the operators and operands entered. (Hint:
    You may need to become familiar with the flush ( ) function,...
  13. Replies
    13
    Views
    13,603

    I had that for Case O before, but now that I have...

    I had that for Case O before, but now that I have changed it back AND made the value1 and 2 switch- it is now working! THANKS!
  14. Replies
    13
    Views
    13,603

    I'm still getting "true" for everything with the...

    I'm still getting "true" for everything with the following code. Also, how is F being treated as an integer? I have all my variables initialized as chars...



    #include <stdio.h>
    #include...
  15. Replies
    13
    Views
    13,603

    In the following program, why when I type in...

    In the following program, why when I type in "FOF" does it result to "true"? When should I use "=="?



    #include <stdlib.h>

    int main (void){
    char value1, value2, loperator;
    char result;
  16. Replies
    13
    Views
    13,603

    lol nvm guess I was supposed to read those in as...

    lol nvm guess I was supposed to read those in as an integer when I print in the switch function
  17. Replies
    13
    Views
    13,603

    Why is this program printing smiley faces instead...

    Why is this program printing smiley faces instead of a 1 or 0???



    #include <stdio.h>
    #include <stdlib.h>

    int main (void){
    char value1;
    char value2;
  18. Replies
    13
    Views
    13,603

    So then there is no right or wrong answer to some...

    So then there is no right or wrong answer to some of them? Like 1||0 can be 1 or 0?? And what about 1 AND 0???
  19. Replies
    13
    Views
    13,603

    logic calculator

    I have a project to make a logic calculator like the one described below, but it literally doesn't make "logic" sense to me. I'm sure I won't have a problem programming it once I know what the hell...
  20. Replies
    8
    Views
    2,731

    For "b. What code got generated to return the...

    For "b. What code got generated to return the result of the function to main?"

    Am I getting warmer or colder by stating "The value is stored by a function in the eax register which is taken to be...
  21. Nevermind, I figured this out on my own. I'm...

    Nevermind, I figured this out on my own. I'm proud of myself :)
  22. Replies
    8
    Views
    2,731

    meh- I don't know its the only instruction after...

    meh- I don't know its the only instruction after "return z;" Am I looking in the wrong place? Since the result would be in the z=x+y then should I be looking at the instructions under it: movsx eax,...
  23. Replies
    8
    Views
    2,731

    More like this? 3/4 is better than I anticipated...

    More like this? 3/4 is better than I anticipated but would be nice to get them all right, lol.

    a. What machine instruction is used to actually invoke (run, transfer control to) your function?...
  24. K got this to work with "int...

    K got this to work with "int theImageArray[MAX_HEIGHT][MAX_WIDTH];" as global. Now that I have that working, I have to find some code to manipulate the brightness outcome of the image. I am looking...
  25. Replies
    8
    Views
    2,731

    Examining the Assembly Listing

    This is my third project in this class involving having to identify what machine instruction is doing what, and I just want to see if I'm doing it right or wrong because that would suck to get three...
Results 1 to 25 of 29
Page 1 of 2 1 2