Thanks alot. I really appreciate your help.
Type: Posts; User: Cstudent2121
Thanks alot. I really appreciate your help.
Where in the program should I be implementing this and when?
This change allowed the program to fully run. Right now, however, it simply displays the inputted information in the order it was received. I need it to only display the employee with the lowest id...
So what are you suggesting 'firstn' be replaced with?
I'm writing a program that stores employee information which includes their first name, last name, and 3-digit id number. The program is supposed to go through the list then display the information...
The code is essentially complete but I am having difficulty outputting the numerical inputs. The areas that are causing the program to fail have been commented out.
#include <stdio.h>
...
I realize that, but for whatever reason that isn't working, and neither is this attempt to patch it up.
That was an attempt to fix the sum problem I am getting. A calculated sum that was less than 20 was having 20 added to it. A sum greater than 20 was outputted normally. So I tried to write a line...
If the sum is calculated to be greater than 20, the program has no problem displaying it. If the sum is less than 20, however, the program feels the need to add 20 to it? I implemented an if/ else...
#include <stdio.h>
#include <string.h>
int sum(int i, int element[i]); /*Prototype for recursive addition */
int main(void)
{
int max_elements, element[20], i, result;
i=0;
...
I need to write a program that recursively calculates the sum of UP TO 20 array elements provided by the user. Currently the program is resulting in an error when I attempt to run it. I'm also not...
Any tips as to how to take a string input and return a copy of the string without the blanks?
Query the user for rainfall numbers for a city for the 12 months of this year as well as last year. Display this output in table form along with the total rainfall and the average rainfall for each...
I had tried variations of that. It appears that the subscript value is being recorded as the last 'i' value in the loop regardless. Therefore, it is getting displayed as 19 everytime. Any suggestions?
Made some updates:
#include <stdio.h>
#include <string.h>
#define max_number 20
int main(void)
{
I need to have the user input up to 20 integer values. Then, I need to display the subscript of the largest value in the array as well as the largest value itself. I think I have the programming...
It was my understanding that while the void returns no value, I still need the return in order for the entire program to complete. Is this incorrect? As far as the simpler ways goes, I don't know...
I need to query the user for the amount owed and the amount received. I then must calculate the change due and display it in the form of dollars, quarters, dimes, nickels and pennies. I need to use...
In the program, I am using a value that is outside the conceivable realm of the data entry to signal to the program to cease receiving input. So when I plug this number in, the program should take...
I think the clutter was what I needed :). The only issue I have now is that the minimum value is being registered as the value entered to end the program. This value isn't taken into account when...
I think this is a relatively simply question but I can't seem to figure it out. Assume a program in which the user enters a collection of numbers. Using a while loop, the program calculates the sum...