Search:

Type: Posts; User: C-bob

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,093

    Reading zeros in valid date function

    The program below determines if date if valid. It works for all dates without a zero in the number. What am I missing?

    Note: Don't worry about leap year. I have not got to that yet, but have a
    ...
  2. I think this is it (tested multiple numbers and...

    I think this is it (tested multiple numbers and it does work), but it just doesn't seem like the right approach.

    If I have wore out my welcome here, just say so. I am new to the forum and getting...
  3. OK. I gave it a shot and it works... but again,...

    OK. I gave it a shot and it works... but again, with warnings ("comparison between pointer and integers".



    #include<stdio.h>

    int is_prime (int p_num);


    /* start of is_prime function */
  4. So... return a 1 (prime) or 0 (not prime) and...

    So... return a 1 (prime) or 0 (not prime) and then have the main function print. What is used in the main to print?
  5. Worked. Thanks.

    Worked. Thanks.
  6. Warnings: Type Mismatch, functions, parameters? Homework: Guidance, not answers.

    Class assignment (requires use of function). Wrote the code. It compiles, runs and gives me the desired result. However, I get warnings... "parameter names (without types) in function declaration,...
  7. Replies
    11
    Views
    13,347

    Wait! Nevemind. I open and closed my compiler and...

    Wait! Nevemind. I open and closed my compiler and Get_input (employeeData, hours) worked. Not sure why that works. Thanks for your help!
  8. Replies
    11
    Views
    13,347

    Did not see the last post from quzah until now....

    Did not see the last post from quzah until now. Thats what I figured out from the last post, but wanted to say, Thanks!

    Now just trying to figure out how to call it in the main function. I tried...
  9. Replies
    11
    Views
    13,347

    My function headers are long. I wanted to keep...

    My function headers are long. I wanted to keep the code I was posting lean. It was a accidently delete when doing so. So much for trying to be considerate.

    Anyways, thanks for the advice. I will...
  10. Replies
    11
    Views
    13,347

    Sorry to waste everyones time. That part is in...

    Sorry to waste everyones time. That part is in the code, I just missed it when copying and pasting into this forum.
  11. Replies
    11
    Views
    13,347

    That is it. Trying to fill employeeData[ x...

    That is it. Trying to fill employeeData[ x ].hours. But... passing it back the values from my "Get_input" function so that it is applied to the structure array. I am just having trouble making the...
  12. Replies
    11
    Views
    13,347

    Passing Function to Structure

    The main function calls for the "Get_input function" using (employeeData, hours). I was hoping that this would pass back to the variable "hours" defined within struct employee employeeData[NUM_EMPL]....
  13. Replies
    11
    Views
    13,347

    Passing Function to Structure

    I am mid way through a program that will calculate the gross pay for a group of employees (output in table format). The function "Get_input" prompts the user to enter the hours worked per the...
Results 1 to 13 of 13