程序設計基礎(C)第01講例程

1.1 listing1.c

#include <stdio.h>
int main(void)
{
    int dogs;
    
    printf("How many dogs do you have?\n");
    scanf("%d", &dogs);
    printf("So you have %d dog(s)!\n", dogs);
    
    return 0;
}

1.2 listing2.c

#include <stdio.h>
int main(void)
{
    printf("Concrete contains gravel and cement.\n");
    
    return 0;
}

1.3 inform.c

#include <stdio.h>
int main(void)
{
    printf("A .c is used to end a C program filename.\n");
    
    return 0;
}
相關文章
相關標籤/搜索