04. 简单计算

创建日期:2024-07-10
更新日期:2025-02-01

simple_calculation.c

#include <stdio.h>

int main()
{
    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\n", total_pets);

    return 0;
}