I have an assignment that I think I more or less understand, but I am lost on how to use functions correctly. As well, we are to include an array that I have no clue how to do.
here is the equation we need to use: x (+-) z o/sqrtN
o = standard deviation
x = sample mean
N = number of samples in the population
z = critical point for the confidence level
The most comment values of...
User Profile
Collapse
-
Functions and Arrays (C)
-
Converting Existing Code into a Function
I have my code all ready and everything works fine with the correct answers, but I don't know how to make functions in it. I only have the main() function at the beginning. how do I even begin to make a function? The examples they have in the book don't really help me because it's not even close to what I am doing.
Like here is one part of my code..
//Declare the variables
double F, S, C, P;
//Obtain... -
Polink Error...Don't know how to fix it
I'm having trouble figuring out to fix this POLINK error in my code. The error states "unresolved external symbol '_same'. Where is the problem exactly in my code? Everything looks fine to me...
#include <stdio.h>
int same (int a, int b, int c); //function prototype
//Program to calculate if numbers are the same
int main (void)
{
int a, b, c, s;
printf... -
Hey...thanks for the help, but I still don't understand it. Your questions made me think more about the problem, but I don't know what to change still. Thanks anyways. -
Harmonic series
Hello. I am having trouble with one of my labs in my programming class. It seems to be simple and to the point, but I'm not sure if I understand it all. This is the question:
Write a program to compute the partial sum of harmonic series
1 + 1/2 +1/3 + ... + 1/n
and display the intermediate partial sums. Hint: use a for loop.
This is what I came up with. I know it's not 100% correct, but...
No activity results to display
Show More
Leave a comment: