Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~89 People Reached
Favorite Forums
Favorite Tags
c++ x 1
Member Avatar for nomorewords

This is a program which finds if a 7char word is a palindrome and if it is it writes it in CAPITAL letters if not in small letters e.g aBcDcbA => ABCDCBA;;; CheetAH=>cheetah; [CODE]#include<iostream> #include<math.h> using namespace std; int main() { int l,d; char c1,c2,c3,c4,c5,c6,c7; cin.get(c1);cin.get(c2);cin.get(c3);cin.get(c4);cin.get(c5);cin.get(c6);cin.get(c7); l=c1==c7||c1==c7+'A'-'a'||c7==c1+'A'-'a';cout<<l<<endl; l=l&&(c2==c6||c2==c6+'A'-'a'||c6==c2+'A'-'a');cout<<l<<endl; l=l&&(c3==c5||c3==c5+'A'-'a'||c5==c3+'A'-'a');cout<<l<<endl; d=l?('A'-'a'):('a'-'A'); …

Member Avatar for WaltP
-1
89