Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
lab7 note

Lab 07

Lab 07 instruction


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