It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center
                            
                        
                    
                
                                6年前关闭。
            
                    
  我正在Xcode(用于Mac的Apple IDE)上进行C编程,并遵循Big Nerd Ranch的Objective C编程指南。难题之一是使用C语言库显示1个弧度的正弦。我导入math.h并做了

     双重罪恶= sin(3.14);

但这给我一个错误。

最佳答案

1弧度不是pi,而是1。

您不能使用作为函数名称的变量名称。

你要

double myValue = sin(1.0);

关于c - 在iMac上进行C教程,面临挑战,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/15305456/

10-10 01:24