This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
#include <random> | |
using namespace std; | |
//See function bodies for comments on these. | |
int * createArray(int & size); | |
void findStats(int * arr, int size, int & min, int & max, double & average); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
using namespace std; | |
int main() | |
{ | |
//Note that in the below example I do not validate the numbers. This is bad practice. Don't do it. | |
int numStudents, | |
numScores, //Values can be separated by comma if they have the same base type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
#define ARRAY_SIZE 128 | |
void lol(const int); //Function header for lol. | |
int main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
void refFunc(int &);//Function headers. They do not require a name or body at this point. | |
void pointerFunc(int *); | |
int main() | |
{ | |
int something = 32; //Declare something as 32. |
NewerOlder