end of w2lec1

This commit is contained in:
2022-03-14 10:50:49 -05:00
parent 91babda1ed
commit f1de37a3e7
2 changed files with 31 additions and 0 deletions

16
Lecture/Week2/main.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include <iostream>
using namespace std;
int & multiply(int A, int B) {
int i = A*B;
return i;
}
int main() {
int A = 5;
int B = 3;
int C = multiply(A,B);
cout << "A: " << A << " B: " << B << " C: " << C << endl;
return 0;
}

15
Lecture/Week2/main2.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include <iostream>
using namespace std;
int main() {
// int length;
// cin >> length;
int array1[3] = {3, 10, 40};
cout << array1 << endl;
cout << *array1 << endl;
cout << array1 << endl;
return 0;
}