新人求助(为什么这个程序最后输出的数值是0?)
代码如下,用的是VS2013版本,
#include <stdio.h>
int main(void)
{
int total_pets;
int cats;
int dogs;
int ponies;
int others;
cats = 2;
dogs = 1;
ponies = 1;
others = 46;
total_pets = cats + dogs + ponies + others;
printf("we have %d pets in total total_pets");
return 0;