Skip to content

red97/PL-SQL-lab-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

PL-SQL-lab-test

Write a PL/SQL code to print the frequency of numbers between 1 and 1000 such that the recursive sum of squares of digits of a number converges cyclically to a one-digit number. (15/20)

Example -

1 -> 1 -> 1 (so on)
2 -> 4 -> 16 -> 37 -> 58 -> 89 -> 145 -> 42 -> 20 -> 4 (cyclical convergence to 4)
3 -> 9 -> 81 -> 65 -> 61 -> 37 -> 58 -> 89 -> 145 -> 42 -> 20 -> 4 (cyclical convergence to 4) 

Answer - For 1 to 3, frequency table is

Number Frequency 
0       0 
1       1
2       0
3       0
4       2
5       0
6       0
7       0  

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages