File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,11 @@ int main() {
10
10
std::cout
11
11
<< " ---------------------- Test isEmptyStack ----------------------"
12
12
<< std::endl;
13
- if (stk.isEmptyStack ())
13
+ if (stk.isEmptyStack ()) {
14
14
std::cout << " PASS" << std::endl;
15
- else
15
+ } else {
16
16
std::cout << " FAIL" << std::endl;
17
+ }
17
18
std::cout << " ---------------------- Test push ----------------------"
18
19
<< std::endl;
19
20
std::cout << " After pushing 10 20 30 40 into stack: " << std::endl;
@@ -25,10 +26,11 @@ int main() {
25
26
std::cout << " ---------------------- Test top ----------------------"
26
27
<< std::endl;
27
28
int value = stk.top ();
28
- if (value == 40 )
29
+ if (value == 40 ) {
29
30
std::cout << " PASS" << std::endl;
30
- else
31
+ } else {
31
32
std::cout << " FAIL" << std::endl;
33
+ }
32
34
std::cout << " ---------------------- Test pop ----------------------"
33
35
<< std::endl;
34
36
stk.display ();
Original file line number Diff line number Diff line change 15
15
#include < string>
16
16
17
17
#include " ./stack.hpp"
18
+ #include " math.h"
18
19
19
20
int main (int argc, char * argv[]) {
20
- double GPA;
21
- double highestGPA;
21
+ double GPA = NAN ;
22
+ double highestGPA = NAN ;
22
23
std::string name;
23
24
24
25
assert (argc == 2 );
You can’t perform that action at this time.
0 commit comments