Search:

Type: Posts; User: newbi

Search: Search took 0.01 seconds.

  1. Website where I can find CS 108 (Program solving and program design in C) chapter rev

    Does anyone know any website where I can review for test, or find chapter reviews or anything that could help me with my review for my exam on CS. The CS book that I'm currently using is (Program...
  2. Replies
    35
    Views
    4,913

    Alright....I guess i was a bit sleepy b4 i read...

    Alright....I guess i was a bit sleepy b4 i read ur reply. Well i got things working now. Thanks. Now I just have to loop it 5 times for 5 election come out.
  3. Replies
    35
    Views
    4,913

    Well apart from the "else" change, its all the...

    Well apart from the "else" change, its all the same. Still "0" value for the Candidates at the end.

    4


    4


    1
  4. Replies
    35
    Views
    4,913

    well its either 1-4

    well its either 1-4
  5. Replies
    35
    Views
    4,913

    #include #include #include...

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

    int main (void)
    {
    int C_A = 0, C_B = 0, C_C = 0, C_D = 0;
    int loop = 0, i = 0, pre = 0;
    int...
  6. Replies
    35
    Views
    4,913

    Well then would you please tell me why my 1st...

    Well then would you please tell me why my 1st code wasn't working
  7. Replies
    35
    Views
    4,913

    i tried this code but it keeps giving me the same...

    i tried this code but it keeps giving me the same value every time


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

    int main (void)
    { ...
  8. Replies
    35
    Views
    4,913

    1. Create an array of 500 voters, name it Votes...

    1. Create an array of 500 voters, name it Votes [500]
    2. Now using an index execute the array 500 times to produce a random number between 1 to 4
    like;


    for (i = 0; i <501; i++)
    ...
  9. Replies
    35
    Views
    4,913

    1. Describe the program 2. Randomly generate 5...

    1. Describe the program
    2. Randomly generate 5 election outcome from 5 precinct.
    a. Each precinct has 500 voters
    b. 500 votes are distributed among 4 candidates
    3. Add up the total votes for...
  10. Replies
    35
    Views
    4,913

    M guessing my loop is not executing

    M guessing my loop is not executing
  11. Replies
    35
    Views
    4,913

    You can just ignore the for statement altogether.

    You can just ignore the for statement altogether.
  12. Replies
    35
    Views
    4,913

    well for now i just want 2 display 500 votes...

    well for now i just want 2 display 500 votes distributed among 4 candidates. And there is 5 precinct. But i'm not worrying about that right now. I just want 2 display the votes for 5 candidates
  13. Replies
    35
    Views
    4,913

    the "pre" things is actually precinct. I wanted 2...

    the "pre" things is actually precinct. I wanted 2 do it 5 times.
  14. Replies
    35
    Views
    4,913

    #include #include...

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

    int main (void)
    {
    int C_A = 0, C_B = 0, C_C = 0, C_D = 0;
    int loop = 0, i = 0,...
  15. Replies
    35
    Views
    4,913

    So u have a separate variable from each candidate...

    So u have a separate variable from each candidate and you randomly generate vote for each candidate 500 times and at the end just add which candidate got what number of total votes. I feel so lost....
  16. Replies
    35
    Views
    4,913

    Naaa just show how much each candidate got among...

    Naaa just show how much each candidate got among 500 votes. U know its like he final result of an election. U show side by side what each candidate got among a certain # of voters.
    e,g. Candidate A...
  17. Replies
    35
    Views
    4,913

    Randomly. After I'm done with the code the user...

    Randomly. After I'm done with the code the user will execute the program and will find the 3 candidates side by side with their randomly generated votes (500 votes distributed among 3) But i cant...
  18. Replies
    35
    Views
    4,913

    Distribution of Fix numbers

    Alright, so what I'm trying to do is write a code that distributes 500 votes among 3 candidates. How am I supposed 2 do that.
    I tried distributing random numbers among 3 but that didn't worked...
  19. Replies
    5
    Views
    3,272

    Well I don't need the rules. I just I have to...

    Well I don't need the rules. I just I have to test the probability. The algorithm that I came up with was:
    1. Intro msg
    2. Ask the user if he wants to know the odds of rolling a Yatzee on a single...
  20. Replies
    5
    Views
    3,272

    Nothing helpful I'm affraid

    Nothing helpful I'm affraid
  21. Replies
    5
    Views
    3,272

    Write a Yatzee Program

    The odds of rolling a Yatzee on a single roll of 5 dice is 1/1296. Write a C program that tests this. Test it 1000 times.

    Ok so I tried to code it and found out I had no idea what to do. Tried few...
Results 1 to 21 of 22