Skip to content

Commit 22cc983

Browse files
Merge pull request #142 from sunnyshahabuddin0/patch-4
Create todo.cpp
2 parents 0cb3949 + b88fb0a commit 22cc983

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

todo.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <iostream>
2+
#include <vector>
3+
int main() {
4+
std::vector<std::string> tasks;
5+
while (true) {
6+
std::string task;
7+
std::cout << "Add a task (or 'q' to quit): ";
8+
std::cin >> task;
9+
if (task == "q") break;
10+
tasks.push_back(task);
11+
}
12+
std::cout << "Tasks:\n";
13+
for (const std::string& task : tasks) {
14+
std::cout << task << "\n";
15+
}
16+
return 0;
17+
}

0 commit comments

Comments
 (0)