小编use*_*534的帖子

如何运行我用JavaScript编写的代码?

我是初学者,我所做的就是练习在Codecademy中编写代码.在谷歌广泛搜索如何运行.js文件之后,我什么都没看到.我假设我问的是错误的问题,我确信这很简单,但我找不到任何东西.

javascript

11
推荐指数
2
解决办法
9532
查看次数

编译C程序时,我收到此错误:hello:没有这样的文件或目录

我以前编译过其他程序,但由于某种原因,我不能再工作了.我有一个mac这是我的代码.它的目的是取三个数字并找到平均值.

#include <stdio.h>
int main(){
int first;
int second;
int third;
float average=0.0;
    printf ("This program will find the average of 3 numbers.\n");
    delay(1000);
    printf ("Type the first number.\n");
    scanf ("%d", &first);
    printf ("Type the second number.\n");
    scanf ("%d", &second);
    printf ("Type the third number.\n");
    scanf ("%d", &third);
    average = (first+second+third)/2.0;
    printf ("The average of %d, %d, and %d is %.3f\n", first, second, third, average);
return (0);
}
Run Code Online (Sandbox Code Playgroud)

这些是我采取的步骤.我把average.c和average.h放在桌面上.我打开终端并输入

cd Desktop 
gcc /Users/reneelion/Desktop/average.c average
Run Code Online (Sandbox Code Playgroud)

然后它说:

average: No such file or …
Run Code Online (Sandbox Code Playgroud)

c macos gcc

1
推荐指数
1
解决办法
5770
查看次数

如何在html中隐藏按钮?

我是HTML的初学者.如何使用JavaScript点击隐藏自己的按钮?这是我已经存在的代码,缺少一条线.

<!DOCTYPE>
<html>
    <body>
        <button type="button" onclick="delete()" = ;>Hello</button>
        <script>
            var delete = function(){
            //hide button
            }
        </script>
    </body>
</html>     
Run Code Online (Sandbox Code Playgroud)

html button

1
推荐指数
1
解决办法
122
查看次数

标签 统计

button ×1

c ×1

gcc ×1

html ×1

javascript ×1

macos ×1