diff options
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)); |