Skip to content

Commit

Permalink
Add initial running program
Browse files Browse the repository at this point in the history
  • Loading branch information
kbuffardi committed Sep 21, 2024
1 parent fa7ae03 commit fc7e124
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
27 changes: 27 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include <iostream>
#include <vector>

using std::cout, std::cin, std::endl, std::string, std::vector;

int main(){
string input = "";
vector<string> list;

do{
if( list.size() == 0 ){
cout << "What is your favorite?\n";
}
else{
cout << "What is your next favorite?\n";
}
cin >> input;
list.push_back(input);
}while( input != "done" );

cout << "Your favorite list:\n";
for(int i = 0; i < list.size(); i++){
cout << list.at(i) << endl;
}

return 0;
}
4 changes: 4 additions & 0 deletions test_runner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

g++ main.cpp --std=c++17 -o MyFave
./MyFave

0 comments on commit fc7e124

Please sign in to comment.