我试图在C编程中找到平方根.但我得到的错误是对sqrt的未定义引用.我的代码是:
#include<stdio.h>
#include<math.h>
void main(void){
int x;
int y;
printf("Enter two number numbers");
scanf("%d", &x);
scanf("%d", &y);
int result;
result = ( x * x ) + ( y * y );
double finalresult = sqrt(result);
printf("%f\n", finalresult);
}
Run Code Online (Sandbox Code Playgroud) 我想创建一个复选框,如果选中它,那么它应该显示下拉列表.如果未选中,则应隐藏下拉列表.这就是我的代码在Form.Designer.cs文件中的外观.
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Items.AddRange(new object[] {
"Database 1",
"Database 2",
"Database 3"});
this.comboBox2.Location = new System.Drawing.Point(165, 436);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(150, 21);
this.comboBox2.TabIndex = 13;
this.comboBox2.Text = "Database";
Run Code Online (Sandbox Code Playgroud)
和我在其他文件中的复选框代码是
if (checkBox1.CheckState == CheckState.Checked)
{
}
Run Code Online (Sandbox Code Playgroud)