【问题标题】:I am having trouble understanding the following code can anyone give the code explanation?我无法理解以下代码,谁能给出代码解释?
【发布时间】:2022-06-11 00:11:48
【问题描述】:
#include<stdio.h>

int sita(int ram, int shayam) 


{
    if (ram == 0)
return 0;

else if (ram % 2)

return sita(ram/2, 2*shayam) + shayam;
  • 否则返回 sita(ram/2, 2*shayam) - shayam;

    } int main()

    { printf("%d", sita(20, 1)); 返回0; }

【问题讨论】:

  • 难怪你看不懂。它的格式非常糟糕。

标签: c function recursion output walkthrough


猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-11-30
  • 2017-05-14
  • 2021-02-27
  • 2022-11-21
  • 2017-04-22
  • 1970-01-01
相关资源
最近更新 更多