Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PalindromeDay
//g++ 7.4.0 //Palindrome Day //this code is created by Rezaul Hoque on February03,2022; //contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.com //note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; #include <iostream> using namespace std; int n=3; int isPalindrome(int [], int ); int isPalindrome(int a[], int n){ int count=0; int i; for (i=0;i<n;i++) if (a[i]==a[n-i-1]) count++; return count; } int main() { int a[n]; cout<<"Enter Day, Month and Year:\n"; for(int i=0;i<n;i++){ cout<<" "; cin>>a[i]; } int result; result=isPalindrome(a, n); if(result==n) {cout<<"\nThe date forms a palindrome.";} else {cout<<"\nThe date does not form a palindrome.";} return 0; }
run
|
edit
|
history
|
help
0
30 აპრილი
Quiz 12/13
CirclQ
Memory_test
same
Updated Linked Lists - 5/10/2017 V3.0
Template
C++ Solar eclipse program(Shoushi integrated) 1568 - 1644 also check Lunar eclipse for Xing Yunlu
Breakfast
pranav pandey