C problem - | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula gr√°tis
0

C problem -

Why I can't get desired output with my code? Which mistake I did in this code? Please help. https://code.sololearn.com/c9WUIJghbij7/?ref=app

3rd May 2021, 8:42 AM
Kiran Ghorpade
Kiran Ghorpade - avatar
2 Respostas
+ 5
Kiran Ghorpade Because you cannot pass value as a reference and also you have just returned value but didn't assign to any variable. get_num(i) //wrong i = get_num(); //right https://code.sololearn.com/c7OpFijJ2Lqb/?ref=app
3rd May 2021, 8:53 AM
AÕĘJ
AÕĘJ - avatar
+ 1
Thank you so much. ūüôŹūüôŹ
3rd May 2021, 10:49 AM
Kiran Ghorpade
Kiran Ghorpade - avatar