This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:dshadeck:portfolio [2015/09/08 00:38] – [HPC0] dshadeck | user:dshadeck:portfolio [2015/10/05 16:51] (current) – [HPC0] dshadeck | ||
---|---|---|---|
Line 1: | Line 1: | ||
======Portfolio====== | ======Portfolio====== | ||
- | =====HPC0===== | ||
- | |||
- | =====Data Structures===== | ||
- | |||
- | ===August 31, 2015=== | ||
- | |||
- | Data structures is a hard class to take with out computers... | ||
- | |||
- | This week was very uneventful due to the above statement. Matt reviewed some topics from our past prerequisite classes to help us get up to pace with what will be needed in our first project. This had me inspired and i started working! | ||
- | |||
- | <code c> | ||
- | #include < | ||
- | |||
- | int main() | ||
- | { | ||
- | int choice = 0; | ||
- | printf ("1) Build List\n" | ||
- | printf ("2) Display List\n" | ||
- | printf ("3) Instert Into List\n" | ||
- | printf ("4) Append Into List\n" | ||
- | printf ("5) Obtain From List\n" | ||
- | printf ("6) Clear List\n" | ||
- | printf ("7) Quit\n" | ||
- | return 0; | ||
- | } | ||
- | </ | ||
- | |||
- | Underwhelming! :D | ||
- | |||
- | |||
- | ===September 07, 2015=== | ||
- | <code c> | ||
- | #include < | ||
- | |||
- | int main(){ | ||
- | int test [20]; | ||
- | int choice = 0; | ||
- | do{ | ||
- | printf ("1) Build List\n" | ||
- | printf ("2) Display List\n" | ||
- | printf ("3) Instert Into List\n" | ||
- | printf ("4) Append Into List\n" | ||
- | printf ("5) Obtain From List\n" | ||
- | printf ("6) Clear List\n" | ||
- | printf ("7) Quit\n" | ||
- | printf (" | ||
- | |||
- | scanf (" | ||
- | | ||
- | if (choice > 7){ | ||
- | printf (" | ||
- | } | ||
- | | ||
- | if (choice == 1){ | ||
- | printf (" | ||
- | int number = 0; | ||
- | int index = 0; | ||
- | int stop = -1; | ||
- | do{ | ||
- | if (index == 19){ | ||
- | test[index] = stop; | ||
- | printf (" | ||
- | break; | ||
- | } else { | ||
- | scanf (" | ||
- | test[index] = number; | ||
- | index++; | ||
- | } | ||
- | } while (number != -1); | ||
- | | ||
- | | ||
- | } else if (choice == 2){ | ||
- | int i; | ||
- | for (i = 0; i <= 19; i++){ | ||
- | int at = test[i]; | ||
- | if (at == -1){ | ||
- | printf ("# -1 @ array index %d\n", i); | ||
- | break; | ||
- | } else { | ||
- | printf ("# %d @ array index %d\n", at, | ||
- | } | ||
- | } | ||
- | } else if (choice == 3){ | ||
- | int nv, ai, in; | ||
- | printf (" | ||
- | scanf (" | ||
- | printf (" | ||
- | scanf (" | ||
- | printf ("nv %d ai %d\n", nv,ai); | ||
- | for (in =0; i <19 | ||
- | } | ||
- | } while (choice != 7); | ||
- | return 0; | ||
- | } | ||
- | </ | ||
- | |||
- | dsi0 is coming along and should be done tonight! W00t W00t. | ||
- | |||