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
test
Microsoft - MaxEmployeeAttendence (R repititions - 1st step towards DP.)
stream1
role of copy constructor
Shortest path in binary tree
Stats - Central Limit Theorem - Normal Distribution with multiple items
Test 16(2020)
Boggle Game
BintTree vertical sum
without HLD range Quey can be handled by just using segment tree on the FLATTENED TREE (euler tour)