From c1b13da17b2d20bdb9392f0e390df771772f0020 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Fri, 29 May 2020 17:37:43 +0200 Subject: chore: order in coding contest folder --- .../Programmazione_2/exercises/cognomi-simili.cc | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 I_anno/Programmazione_2/exercises/cognomi-simili.cc (limited to 'I_anno/Programmazione_2/exercises/cognomi-simili.cc') diff --git a/I_anno/Programmazione_2/exercises/cognomi-simili.cc b/I_anno/Programmazione_2/exercises/cognomi-simili.cc new file mode 100644 index 0000000..fa74a22 --- /dev/null +++ b/I_anno/Programmazione_2/exercises/cognomi-simili.cc @@ -0,0 +1,53 @@ +#include +#include +#include + +using namespace std; + +string check(string s, char chs[], int n) { + if(s.length()> n >> s; + ++n; + char* chs = new char[n]; + out << s << ' '; + get_chs(s, chs, n); + for(int i = 0; i < 2; ++i) { + in >> s; + out << check(s, chs, n); + get_chs(s, chs, n); + } + out << '\n'; + } + + in.close(); + out.close(); + return 0; +} -- cgit v1.2.3-18-g5258