#10783: 求解 哪裡錯


somecar0257 (unknown)


#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
int x,y,z;
printf("輸入第一個整數\n");
scanf("%d,&x");
printf("輸入第二個整數\n");
scanf("%d,&y");
z=x+y;
printf("%d",&z);
return 0;
}

#10785: Re:求解 哪裡錯


anandrewboy70900 (ShowTsai)


 

scanf("%d,&x"); -> scanf("%d",&x);

注意引號