aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
diff options
context:
space:
mode:
authorMusa Ahmed <[email protected]>2022-10-05 20:13:44 -0700
committerMusa Ahmed <[email protected]>2022-10-05 20:13:44 -0700
commit23eae77930f3bf7f568d1ffd94c1f63a88b3d6b5 (patch)
treea10db8ca6a6aa981e9d0a432c90dc252d5b53d66 /CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
parenttest (diff)
downloadcst116-proj1-23eae77930f3bf7f568d1ffd94c1f63a88b3d6b5.tar.xz
cst116-proj1-23eae77930f3bf7f568d1ffd94c1f63a88b3d6b5.zip
added for loop
Diffstat (limited to 'CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp')
-rw-r--r--CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp b/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
index b758ea2..71d06c9 100644
--- a/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
+++ b/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
@@ -6,6 +6,7 @@
#include <string>
#include <list>
#include <bitset>
+#include <vector>
using namespace std;
using std::cout;
using std::cin;
@@ -30,20 +31,31 @@ int main()
string i3;
string i4;
- for (int i = 0; i < 4; i++) {
+ vector<string> n;
+ vector<string> g;
+ vector<string> c;
+
+
+ for (int i = 0; i < 4; i++) {
cout << "enter a name" << endl;
cin >> n1;
+ n.push_back(n1);
cout << "enter a gpa" << endl;
cin >> g1;
+ g.push_back(g1);
cout << "enter an income" << endl;
cin >> i1;
+ c.push_back(i1);
}
-
+ for (string i : n) {
+ cout << i << ' ';
+ }
+
return 0;