Skip to content

Instantly share code, notes, and snippets.

@romanegloo
Last active March 7, 2019 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romanegloo/54814d0754c4fa54b9d489577c41df31 to your computer and use it in GitHub Desktop.
Save romanegloo/54814d0754c4fa54b9d489577c41df31 to your computer and use it in GitHub Desktop.
lab7 note

Lab 07

Lab 07 instruction

Review

struct definition

struct type_name {
    int var1, var2;
    string varr, var4;
};

type_name struct_var1;

struct_var1.var1 = 14;

function definitions

exlain about the pointer symbol &

// ask users to enter num. den. of a fraction
fraction askFraction() { }

// with the num. and den. calculate the value of the fraction
void calcDecimal(fraction & f) {}

// modifies a partial array of fractions
void askFractionList(fraction f[], int & numFractions) {}

// print out given partial array of fractions in "num. / den. (val.)" format
void printFractionList(fraction f[], int numFractions) {}

// return the index to the max fraction
int findMaxFraction(fraction f[], int numFractions) {}

// run
int main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment