aboutsummaryrefslogtreecommitdiff
path: root/problems/rubyshousehunt/attachments/template.cpp
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-09-30 16:08:27 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-09-30 16:08:27 +0530
commit3496b0ed08c51e37e135e686b1632fd86f930c2c (patch)
tree1da44792489607070f3b4ca14d82af05b73e362b /problems/rubyshousehunt/attachments/template.cpp
(init): Initialize repository.
Diffstat (limited to 'problems/rubyshousehunt/attachments/template.cpp')
-rw-r--r--problems/rubyshousehunt/attachments/template.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/problems/rubyshousehunt/attachments/template.cpp b/problems/rubyshousehunt/attachments/template.cpp
new file mode 100644
index 0000000..0f9ddf7
--- /dev/null
+++ b/problems/rubyshousehunt/attachments/template.cpp
@@ -0,0 +1,26 @@
+#include <iostream>
+#include <string>
+#include <vector>
+#include <algorithm>
+
+using namespace std;
+
+int main()
+{
+ int income;
+ float mr;
+ int savings;
+ cin >> income >> mr >> savings; cin.ignore();
+ int n;
+ cin >> n; cin.ignore();
+ for (int i = 0; i < n; i++) {
+ int price;
+ int expenses;
+ cin >> price >> expenses; cin.ignore();
+ }
+
+ // Write an answer using cout. DON'T FORGET THE "<< endl"
+ // To debug: cerr << "Debug messages..." << endl;
+
+ cout << "Yes, the house is affordable with 1 roommate(s) and $1 to spare." << endl;
+}