diff options
author | Santo Cariotti <dcariotti24@gmail.com> | 2020-05-24 15:21:07 +0200 |
---|---|---|
committer | Santo Cariotti <dcariotti24@gmail.com> | 2020-05-24 15:21:07 +0200 |
commit | d58e4f1ff807fc7ef321495ed6e231ea798102d5 (patch) | |
tree | 2e71237b966378148f9dd11532d24fe7da0c290e /I_anno/Programmazione_2/exercises/ripetute.cc | |
parent | 3abe1723e3cb3a6cdf189db47cc8936ff4c32141 (diff) |
feat: add exercises
Diffstat (limited to 'I_anno/Programmazione_2/exercises/ripetute.cc')
-rw-r--r-- | I_anno/Programmazione_2/exercises/ripetute.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/I_anno/Programmazione_2/exercises/ripetute.cc b/I_anno/Programmazione_2/exercises/ripetute.cc new file mode 100644 index 0000000..23d151a --- /dev/null +++ b/I_anno/Programmazione_2/exercises/ripetute.cc @@ -0,0 +1,20 @@ +#include<iostream> +#include<string> +#include<fstream> + +using namespace std; + +int main() { + ifstream in("input.txt"); + ofstream out("output.txt"); + + for(int ts = 0; ts < 100; ++ts) { + string s; + in >> s; + out << s+s << '\n'; + } + + in.close(); + out.close(); + return 0; +} |