summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vs/in-class-exercise-6-connormcdowell275/v17/.wsuobin22016 -> 26624 bytes
-rw-r--r--.vs/in-class-exercise-6-connormcdowell275/v17/Browse.VC.dbbin401408 -> 10813440 bytes
-rw-r--r--.vs/slnx.sqlitebin323584 -> 323584 bytes
-rw-r--r--Project1/header.h11
-rw-r--r--Project1/inclass6.cpp62
5 files changed, 73 insertions, 0 deletions
diff --git a/.vs/in-class-exercise-6-connormcdowell275/v17/.wsuo b/.vs/in-class-exercise-6-connormcdowell275/v17/.wsuo
index 70e0a22..d178da0 100644
--- a/.vs/in-class-exercise-6-connormcdowell275/v17/.wsuo
+++ b/.vs/in-class-exercise-6-connormcdowell275/v17/.wsuo
Binary files differ
diff --git a/.vs/in-class-exercise-6-connormcdowell275/v17/Browse.VC.db b/.vs/in-class-exercise-6-connormcdowell275/v17/Browse.VC.db
index b20bced..ffefd81 100644
--- a/.vs/in-class-exercise-6-connormcdowell275/v17/Browse.VC.db
+++ b/.vs/in-class-exercise-6-connormcdowell275/v17/Browse.VC.db
Binary files differ
diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite
index d8f3d7d..385474d 100644
--- a/.vs/slnx.sqlite
+++ b/.vs/slnx.sqlite
Binary files differ
diff --git a/Project1/header.h b/Project1/header.h
index 6f70f09..46ecf39 100644
--- a/Project1/header.h
+++ b/Project1/header.h
@@ -1 +1,12 @@
#pragma once
+int returnInt();
+
+int sum(int a, int b);
+
+float percentage(int a, int b);
+
+float FtoC(int fah);
+
+float CtoF(int cel)
+
+# \ No newline at end of file
diff --git a/Project1/inclass6.cpp b/Project1/inclass6.cpp
index e69de29..211d467 100644
--- a/Project1/inclass6.cpp
+++ b/Project1/inclass6.cpp
@@ -0,0 +1,62 @@
+// Name: Connor McDowell
+// Date: 1/22/2024
+// Class: CST116
+// Assignment: exercise 5
+
+#include <iostream>
+
+#include "helper.h"
+
+int main()
+{
+ int mySum = sum(15, 30);
+
+ std::cout << mySum << std::endl;
+
+ std::cout << returnInt() << std::endl;
+
+ std::cout << percentage() << std::endl;
+ std::cout << FotC(0) << std::endl;
+ std::cout << returnInt() << std::endl;
+}
+
+int returnInt()
+{
+
+ return 10;
+}
+
+int sum(int a, int b)
+{
+ int sum = 0;
+ sum = a + b;
+
+ return sum;
+}
+
+float percentage(int a, int b)
+{
+ int perc = 0;
+ perc = (static_cast<float>(a) / b) * 100;
+
+ return perc;
+}
+
+
+float FtoC(int fah)
+{
+ // -32*5/9
+
+ float num = (fah - 32) * (5 / 9);
+
+ return num;
+}
+
+float CtoF(int cel)
+{
+ // 9/5+32
+
+ float num = (cel * (9.0 / 5.0)) + 32;
+
+ return num;
+} \ No newline at end of file