Skip to content

Commit 583006b

Browse files
authored
Merge pull request ashutosh97#160 from ameerasherin98/patch-1
Update Source1.cpp
2 parents 8b9ca80 + 92f40d9 commit 583006b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Check_String_Palindrome/Source1.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using namespace std;
55

6+
//This is a function that returns a boolean value, after checking the string.
67
bool checkStringPallindrome(string inputString);
78

89
bool checkStringPallindrome(string inputString) {
@@ -13,17 +14,17 @@ bool checkStringPallindrome(string inputString) {
1314
}
1415
return true;
1516
}
16-
int main() {
17+
void main() {
1718

18-
string input;
19-
getline(cin, input);
19+
clrscr(); //this inbuild function clears the screen
20+
string input; //the string to check whether its palindrome or not
21+
getline(cin, input);
2022
if (checkStringPallindrome(input)) {
2123
cout << "true" << endl;
2224
}
2325
else {
2426
cout << "false" << endl;
2527
}
2628

27-
system("pause");
28-
return 1;
29-
}
29+
getch();
30+
}

0 commit comments

Comments
 (0)