diff options
| author | Musa Ahmed <[email protected]> | 2022-10-11 19:16:26 -0700 |
|---|---|---|
| committer | Musa Ahmed <[email protected]> | 2022-10-11 19:16:26 -0700 |
| commit | aa521c9dfdfc275f327143bd35b44cdd17e92751 (patch) | |
| tree | 6f2685e661068b59bcf895fdecacfba644069777 /CST116-Ch5-Debugging/CST116-Project1.cpp | |
| parent | gpa precision (diff) | |
| download | cst116-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.cpp | 3 |
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)); |