C程序没有显示预期的输出

时间:2017-10-02 17:44:08

标签: c netbeans netbeans-8

我使用NetBeans 8.2以C语言编程用于大学目的,但我遇到了问题。 当我编译并运行任何程序时,它没有显示正确的输出printf("Inserisci tre numeri\n")

然而,我可以进入 参数,并在给定提交的情况下,程序显示操作和说明 我想在一开始做。

这是完整的代码:

 #include <stdio.h>
int main()
{
    int a, b, c;
    float sum, prod;
    float med;

    printf("Inserisci tre numeri\n");
    scanf("%d %d %d", &a,&b,&c);

    sum = a+b+c;
    prod = a*b*c;
    med = sum/3;

    printf("Somma=%.0f prodotto=%.0f media=%f\n", sum, prod, med);

    return 0;
}

Here's the screen of the output.

谢谢!

0 个答案:

没有答案
相关问题