aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-01-27 16:56:22 -0600
committerRossTheRoss <msattr@gmail.com>2019-01-27 16:56:22 -0600
commit3d3bf993bd6471d5f7d4ada1e601edacf044f431 (patch)
tree02309703190d8effdf8a127181fc623990473884 /ee1301
parentRearrange things! (diff)
downloadhomework-3d3bf993bd6471d5f7d4ada1e601edacf044f431.tar
homework-3d3bf993bd6471d5f7d4ada1e601edacf044f431.tar.gz
homework-3d3bf993bd6471d5f7d4ada1e601edacf044f431.tar.bz2
homework-3d3bf993bd6471d5f7d4ada1e601edacf044f431.tar.lz
homework-3d3bf993bd6471d5f7d4ada1e601edacf044f431.tar.xz
homework-3d3bf993bd6471d5f7d4ada1e601edacf044f431.tar.zst
homework-3d3bf993bd6471d5f7d4ada1e601edacf044f431.zip
?
Diffstat (limited to '')
-rw-r--r--ee1301/wk0/hw0/HW1_snell.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ee1301/wk0/hw0/HW1_snell.cpp b/ee1301/wk0/hw0/HW1_snell.cpp
index e27428c..6d77cee 100644
--- a/ee1301/wk0/hw0/HW1_snell.cpp
+++ b/ee1301/wk0/hw0/HW1_snell.cpp
@@ -6,16 +6,16 @@ using namespace std;
int main()
{
double inAngle, firstRI, secondRI;
- cout << "Input incident angle: ";
+ cout << "Input incident angle in degrees: ";
cin >> inAngle;
- cout << "Input index of refraction of first medium: ";
+ cout << "Input index of refraction of first medium in degrees: ";
cin >> firstRI;
- cout << "Input index of refraction of second medium: ";
+ cout << "Input index of refraction of second medium in degrees: ";
cin >> secondRI;
inAngle = inAngle *M_PI / 180.0; // convert to radians
double outAngle = 180/M_PI * asin(firstRI/secondRI * sin(inAngle)); //snell's law
- cout << "Refracted angle: " << outAngle <<endl;
+ cout << "Refracted angle in degrees: " << outAngle <<endl;
return 0;
}