summaryrefslogtreecommitdiff
path: root/palindromo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'palindromo.cc')
-rw-r--r--palindromo.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/palindromo.cc b/palindromo.cc
deleted file mode 100644
index 1cb19a2..0000000
--- a/palindromo.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-// ConsoleApplication1.cpp : definisce il punto di ingresso dell'applicazione console.
-//
-#include "stdafx.h"
-#include <iostream>
-
-using namespace std;
-
-bool palindromo(int i, int j, char str[])
-{
- if (i >= j) return true;
- else if (str[i] == str[j]) return palindromo(i + 1, j - 1, str);
- else return false;
-}
-
-int main()
-{
- char parola[] = "onorarono";
-
- cout << ( (palindromo(0, sizeof parola - 2, parola) == 1) ? "E' palindromo" : "Non e' palindromo" ) << endl;
-
- cin.get();
-
- return 0;
-}
-