aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-04-22 12:30:35 -0500
committerRossTheRoss <msattr@gmail.com>2019-04-22 12:30:35 -0500
commit5734d553ca690ee3ab4da6094c398671cced8b76 (patch)
tree65802b2496ccd586d948370992a940503617746b
parente (diff)
downloadhomework-5734d553ca690ee3ab4da6094c398671cced8b76.tar
homework-5734d553ca690ee3ab4da6094c398671cced8b76.tar.gz
homework-5734d553ca690ee3ab4da6094c398671cced8b76.tar.bz2
homework-5734d553ca690ee3ab4da6094c398671cced8b76.tar.lz
homework-5734d553ca690ee3ab4da6094c398671cced8b76.tar.xz
homework-5734d553ca690ee3ab4da6094c398671cced8b76.tar.zst
homework-5734d553ca690ee3ab4da6094c398671cced8b76.zip
Finish Lab late
Diffstat (limited to '')
-rw-r--r--ee1301/wk6/lab5/momentum.cpp22
-rw-r--r--ee1301/wk6/lab5/strap012_lab5_w_1.cpp2
-rw-r--r--test.txt20
3 files changed, 43 insertions, 1 deletions
diff --git a/ee1301/wk6/lab5/momentum.cpp b/ee1301/wk6/lab5/momentum.cpp
new file mode 100644
index 0000000..ef7a7e7
--- /dev/null
+++ b/ee1301/wk6/lab5/momentum.cpp
@@ -0,0 +1,22 @@
+#include <iostream>
+
+double* momentum (double velocity[3], double mass);
+
+int main() {
+ double velocity[3];
+ double mass;
+ std::cout << "Please enter velocity (x y z) [m/s]: ";
+ std::cin >> velocity[0] >> velocity[1] >> velocity [2];
+ std::cout << "Please enter mass [kg]: ";
+ std::cin >> mass;
+ momentum(&velocity[3], mass);
+}
+
+double* momentum(double velocity[3], double mass) {
+ double* vector;
+ vector = new double[3];
+ for (int i=0; i<2; i++) {
+ vector[i]=velocity[i]*mass;
+ }
+ return vector;
+} \ No newline at end of file
diff --git a/ee1301/wk6/lab5/strap012_lab5_w_1.cpp b/ee1301/wk6/lab5/strap012_lab5_w_1.cpp
index f503fc9..d42cd95 100644
--- a/ee1301/wk6/lab5/strap012_lab5_w_1.cpp
+++ b/ee1301/wk6/lab5/strap012_lab5_w_1.cpp
@@ -1,5 +1,5 @@
#include <iostream>
-//#include <time.h> //Needed if using MinGW
+//#include <time.h> //Needed if using MinGW
class DeckOfCards {
private:
diff --git a/test.txt b/test.txt
new file mode 100644
index 0000000..b637808
--- /dev/null
+++ b/test.txt
@@ -0,0 +1,20 @@
+CONTEXT OF IT ALL:
+ Location:
+ -
+ Performer:
+ -
+ Audience:
+ -
+ Presentation: MINE
+ -Filmed for the show "The Hollywood Palace"
+ -Stage is elaborate and decorated
+ -Sinatra is dressed in full tux, Basie right behind him on piano
+ -Sinatra occasionally snaps along with the beat
+ -Filmed for TV, Sinatra looks into camera
+ -Full lined up jazz orchestra in background accompanying
+ -Sinatra and crew laugh after "Fly me to the Moon" finishes, ans sometimes smile during breaks
+ -Audience applauds afterwards
+ -Performance is continuous sans slight applause breaks between songs
+ -Afterwards, grabs tea and jokes with audience
+ Including alcohol jokes
+ Sinatra thanks Quincy Jones, one of Sinatra's band mates \ No newline at end of file