#include <stdio.h>
void main ()
{ int a,b,sum; printf("please print the first number:"); scanf("%d",a); printf("print another number:"); scanf("%d",b); sum=a+b; printf("sum=%d\n",sum);
}
#include <stdio.h>
void main ()
{ int a,b,sum; printf("please print the first number:"); scanf("%d",&a);/*加上&就可以了*/ printf("print another number:"); scanf("%d",&b); /*加上&就可以了*/ sum=a+b; printf("sum=%d\n",sum); getch();
}
#include <stdio.h>
void main ()
{ int a,b,sum=0; printf("please print the first number:"); scanf("%d",&a); printf("print another number:"); scanf("%d",&b); sum=a+b; printf("sum=%d\n",sum);
}