From 9d7fe660fae020bfe5650cd12890c19680f2ef55 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 18 May 2017 17:25:46 +0200 Subject: deleted some file --- cpp/palindromo.cc | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 cpp/palindromo.cc (limited to 'cpp/palindromo.cc') diff --git a/cpp/palindromo.cc b/cpp/palindromo.cc deleted file mode 100644 index 1cb19a2..0000000 --- a/cpp/palindromo.cc +++ /dev/null @@ -1,25 +0,0 @@ -// ConsoleApplication1.cpp : definisce il punto di ingresso dell'applicazione console. -// -#include "stdafx.h" -#include - -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; -} - -- cgit v1.2.3-18-g5258