我有一個簡單的C程序簡單的C程序不打印輸出
#include <stdio.h>
int add(int, int);
int add (int a, int b) {
return a+b;
}
int main(void) {
int a, b, c;
printf("Enter the 1st number ");
scanf("%d",&a);
printf("Enter the 2nd number ");
scanf("%d",&b);
c = add(a, b);
printf("The value is %d ", c);
return (0);
}
我編譯程序與cc main.c
,當我與./a.out
運行的程序,我沒有得到任何輸出在安慰。
它在我的系統使用gcc – Haris
@FFgTYnh是什麼我後a.out的意思是完美運行? –
** C不是C++不是C!** – Olaf