Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions #3_largest_palindrome.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdio.h>

int reverse_num(int num)
int reverse_num(int num) //This function return the reverse of a number
{
int ret = 0, value = 1, temp = 0;
temp = num;
Expand All @@ -23,7 +23,7 @@ int reverse_num(int num)
return ret;
}

int check_palindrome(int num)
int check_palindrome(int num)//This function checks whether it is a palindrome or not
{
if(num==reverse_num(num))
return 1;
Expand All @@ -42,7 +42,7 @@ int main(void)
temp = i * j;
if(check_palindrome(temp))
{
if(temp>largest)
if(temp>largest)//Compares the palindromes to find the largest of them
{
largest = temp;

Expand Down