0

Please help me to correct this program.

https://code.sololearn.com/c7QOP0jNb7oG/?ref=app

12th Sep 2020, 8:49 AM
TeaserCode
5 Réponses
+ 3
In main function when u calling function leyland_num(num) you passing one argument num but your num is uninitilize https://www.google.com/amp/s/www.geeksforgeeks.org/leyland-number/amp/
12th Sep 2020, 9:43 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
First of all what is Leyland numbers🧐🧐
12th Sep 2020, 9:10 AM
Alaska
Alaska - avatar
0
Yes, I know. The statement is: num= a^b + b^a. a, b > 1.
12th Sep 2020, 9:14 AM
TeaserCode
0
Make two loops. Outer loop : i<num Inner loop : j<=i Store the pow(i,j)+pow(j,i) in a vector. And when both loop ends sort the vector and print first N numbers to get leyland numbers. PS: based on the definition I read on google
12th Sep 2020, 9:32 AM
Alaska
Alaska - avatar
0
Ok, thank you.
12th Sep 2020, 9:37 AM
TeaserCode