山东大学23强基班计算机导论第一次习题答案

山东大学23强基班计算机导论第一次习题答案

T1.

#include <stdio.h>

int main()
{
        printf("Hello World!");
        return 0;
}

T2.

#include <stdio.h>

int main()
{
        printf("Programming is fun.\nAnd Programming in C is even more fun!");
        return 0;
}

T3.

#include <stdio.h>

int main()
{
        printf("Welcome to You!");
        return 0;
}

T4.

#include <stdio.h>

int main()
{
        printf("****\n***\n**\n*");
        return 0;
}

T5.

#include <stdio.h>

int main()
{
        printf("  A\nA   A\n  A");
        return 0;
}

T6.

#include <stdio.h>

int main()
{
        printf("I'm gonna WIN!\nI'm gonna WIN!\nI'm gonna WIN!");
        return 0;
}

T7.

#include <stdio.h>

int main()
{
        printf("[1] Select crisps\n[2] Select popcorn\n[3] Select chocolate\n[4] Select cola\n[0] Exit");
        return 0;
}

T8.

#include <stdio.h>

int main()
{
        printf("------------------------------------\n\
Province      Area(km2)   Pop.(10K)\n\
------------------------------------\n\
Anhui         139600.00   6461.00\n\
Beijing        16410.54   1180.70\n\
Chongqing      82400.00   3144.23\n\
Shanghai        6340.50   1360.26\n\
Zhejiang      101800.00   4894.00\n\
------------------------------------");
        return 0;
}

T9.

#include <stdio.h>

int main()
{
        printf("学而不思则罔,\n\
思而不学则殆。\n\
");
        return 0;
}

T10.

#include <stdio.h>

int main()
{
        int a, b;
        scanf("%d%d",&a,&b);
        printf("Hello, %d and %d!",a,b);
        return 0;
}
posted @ 2024-03-08 14:23  Icys  阅读(47)  评论(0编辑  收藏  举报