aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch5-Debugging/CST116-Project1.cpp
diff options
context:
space:
mode:
authorMusa Ahmed <[email protected]>2022-10-11 19:16:26 -0700
committerMusa Ahmed <[email protected]>2022-10-11 19:16:26 -0700
commitaa521c9dfdfc275f327143bd35b44cdd17e92751 (patch)
tree6f2685e661068b59bcf895fdecacfba644069777 /CST116-Ch5-Debugging/CST116-Project1.cpp
parentgpa precision (diff)
downloadcst116-proj1-aa521c9dfdfc275f327143bd35b44cdd17e92751.tar.xz
cst116-proj1-aa521c9dfdfc275f327143bd35b44cdd17e92751.zip
updated table
Diffstat (limited to 'CST116-Ch5-Debugging/CST116-Project1.cpp')
-rw-r--r--CST116-Ch5-Debugging/CST116-Project1.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/CST116-Ch5-Debugging/CST116-Project1.cpp b/CST116-Ch5-Debugging/CST116-Project1.cpp
index 5c42eba..cf57569 100644
--- a/CST116-Ch5-Debugging/CST116-Project1.cpp
+++ b/CST116-Ch5-Debugging/CST116-Project1.cpp
@@ -42,6 +42,7 @@ int main()
+
cout << "Enter a decimal gpa: " << endl;
cin >> temp;
@@ -63,7 +64,7 @@ int main()
cin >> temp;
}
- float val = roundf(stod(temp) * 100)/100;
+ double val = roundf(stod(temp) * 100)/100;
gpa = val;
g.push_back(to_string(gpa));