0
Please help me to correct this program.
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/
+ 1
First of all what is Leyland numbers🧐🧐
0
Yes, I know. The statement is:
num= a^b + b^a.
a, b > 1.
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
0
Ok, thank you.