10 .Pl/SQL Program for Palindrome Number

 

10 .Pl/SQL Program for Palindrome Number

 use dbms;
drop procedure palindrome;
 select * from cse;
    DELIMITER &&
    CREATE procedure palindrome(IN `c` INT )
    BEGIN
        declare i int;
        declare rev int;
        declare copy int;
        set rev=0;
        set i=c;
        set copy = i;
        while i>0 do 
        
        set rev=(rev*10)+i%10;
        set i = floor(i/10);
            
        end while;
            if (rev=copy) then
            select 'It is palindrome.';
            else 
            select 'It is not palindrome.';
            end if;
        
    END &&
    DELIMITER ;

 CALL palindrome(31213);


Post a Comment

1 Comments

  1. #!/usr/bin/env python
    # coding: utf-8

    # In[1]:


    print("hello world");


    # In[2]:


    c = input("enter")
    print("c= " + c)


    # In[3]:


    import numpy as np
    import pandas as pd


    # In[7]:


    data = pd.read_csv('iris.csv')
    data.head()


    # In[12]:


    for i in range(0,5):
    for j in range(0,i):
    print('*', end=' ')
    print()


    # In[13]:


    data.info()


    # In[14]:


    data.describe()


    # In[ ]:




    ReplyDelete

If you have any doubts/suggestion/any query or want to improve this article, you can comment down below and let me know. Will reply to you soon.