We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b9ca80 + 92f40d9 commit 583006bCopy full SHA for 583006b
Check_String_Palindrome/Source1.cpp
@@ -3,6 +3,7 @@
3
4
using namespace std;
5
6
+//This is a function that returns a boolean value, after checking the string.
7
bool checkStringPallindrome(string inputString);
8
9
bool checkStringPallindrome(string inputString) {
@@ -13,17 +14,17 @@ bool checkStringPallindrome(string inputString) {
13
14
}
15
return true;
16
-int main() {
17
+void main() {
18
- string input;
19
- getline(cin, input);
+ clrscr(); //this inbuild function clears the screen
20
+ string input; //the string to check whether its palindrome or not
21
+ getline(cin, input);
22
if (checkStringPallindrome(input)) {
23
cout << "true" << endl;
24
25
else {
26
cout << "false" << endl;
27
28
- system("pause");
- return 1;
29
-}
+ getch();
30
+}
0 commit comments