Thanks, I went with this:
#include <iostream>
using namespace std;
double dCalcTotal ();
double PrintTotal (double dTotal);
int iCredits;
Type: Posts; User: mdthejericho
Thanks, I went with this:
#include <iostream>
using namespace std;
double dCalcTotal ();
double PrintTotal (double dTotal);
int iCredits;
I'm working on a program that needs to calculate the total cost of tuition.
Enter amount of credits -- multiply credits by 100.00 -- add 20.00 as student activity fee -- print final number.
...
Thanks! I'm going to work on this for a bit and let you know when I come up with.
Thanks, Adak. I took out the return part at the end of the main program and it worked. Previously, it was giving me all these numbers.
Looks good. I need to compute the median, mean, and sum now!...
Here is my main program and I keep getting the value 0.00 when I try to play around with displaying the array:
int main(void)
{
int n;
n = fillArray (x, SIZE);
Could anyone point me in the right direction?
Okay, the code compiles and I can type in numbers, but how do I display all the values in the main program? That's what I was trying to do with those "print" commands that didn't make sense. Here'...
THAT WAS IT!!! Yes. Now it compiles and I can try to get the rest of it working. Eventually, I need to write functions that compute the mean and sum.
Thanks, guys! I'm glad to be here and plan on learning a lot. I'm going to review all the responses and try some out. I'll post what I come up with.
Also, the biggest error I got was a constant...
I'm working on this code for an assignment:
#include <stdio.h>
#include <math.h>
#define SIZE = 100
double x[SIZE];
#define SENTINEL -1