Alttaki sorunun cevabını bilen var mı ?
Using Octave, write a function called "is_palindrome" that determines whether the entered string is a
palindrome or not. The function will return logical 1 if the input is a palindrome, and logical 0
otherwise.
Matlab soru ?
1
●97
- 13-06-2020, 02:52:37Matlab syntax hakkinda çok bilgim yok fakat palidrom sağdan ve soldan okunduğu zaman aynı olan kelimelere deniliyor yani bir kontrol yapacaksınız. İlk eleman ile son elemanı kiyaslatacaksiniz eğer eşitlik bozulursa 0 returnleyeceksiniz.
Örnek kod : (Deneme şansım olmadı hata olabilir)
For(i=0 i<length/2 i++){
İf( !(kelime[i]==kelime [lenght-i-1] ) )
return 0