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
...
Type: Posts; User: C-bob
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
...
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...
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 */
So... return a 1 (prime) or 0 (not prime) and then have the main function print. What is used in the main to print?
Worked. Thanks.
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,...
Wait! Nevemind. I open and closed my compiler and Get_input (employeeData, hours) worked. Not sure why that works. Thanks for your help!
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...
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...
Sorry to waste everyones time. That part is in the code, I just missed it when copying and pasting into this forum.
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...
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]....
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...