gpt4 book ai didi

php - 逻辑编程帮助

转载 作者:行者123 更新时间:2023-12-04 23:32:51 24 4
gpt4 key购买 nike

A = if infos !empty 和 inputs 为空 - 删除;

B = if infos 为空且inputs !empty - 添加;

C = if infos !empty and inputs !equal to infos- 添加;

我们可以这样:

if B //it's the most common operation, so at the beginning.
{
//add
}
else
{
//remove
}
elseif(c)
{
//the same add
}

我相信这可以是更好的想法。我可以得到你的帮助吗?

提前致谢

最佳答案

if (B || C) 
{
//add
}
else
{
//remove
}

关于php - 逻辑编程帮助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3635089/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com