Writing code like that is like adding when you should be multiplying.
Type: Posts; User: blurx
Writing code like that is like adding when you should be multiplying.
What is this? Look at this again.
return sumDigits;
It would be c[4] = a[4] + b[4].
Is your teacher by chance Professor Reed? I won't list his first name for obvious reasons, but I'm curious since I had this exact assignment three semesters ago.
Store it into an array and print the array backwards.
Well the problem doesn't seem to specify whether to store the word backwards in an array so printing the original array in reverse would produce the same answer.
Um, when you print that data back, then you can put it in that format. You can't name an integer with "/" characters.
Your first error right here.
struct DOB{ int dd/mm/yyyy
};
Hmm, what's the point of a TA if they can't help you? Although it's questionable if you want "help" or someone to do it for you.
Look at the values passed into the fx function, there's your answer.
But, his assignment never even asked for a pointer or an array so it baffles the mind why he is defining one.
When you increment count, how will you tally up the individual numbers count? One way is to make another array with 100 items, and use the subscript of that array to count the tally for the numbers....
#include <stdio.h>
int main (void) {
int fahrenheit = 212;
const int SUBTRACT_NUM = 32;
const float RATIO = 5.0/9.0;
...
That is still bad. The opening brace before the for loop should be after.
Are you saying I need two arrays? The two 'arraysize' text confuses me.
I'm not understanding how to count the frequency of an array element so I basically did the long version. From what I understand, I am suppose to make an array of eleven elements to mirror the 11...
c was a pointer so it did mean one element before. Thanks.
Say if a function accessed this element in an array called c. What does it mean?
1 is rather straight forward. It's obviously not A or C since they deal with external functions. D is just completely wrong so its obviously B.
You should post your code for people to see where you went wrong.
Declare it then.
int residue[50];
min = min;
That isn't helping.
Why not declare and define the struct in the header file?
For average, add them all up after reading them, with say sum += temp, while incrementing a count to divide the sum by the count.
If you're trying to find out the sum, why are you printing out the digits?