大家好,我是还未秃头的阿洋,今天介绍pta7-5;
本题要求编写程序,按照规定格式输出表格。
输入格式:
本题目没有输入。
输出格式:
要求严格按照给出的格式输出下列表格:
------------------------------------
Province Area(km2) Pop.(10K)
------------------------------------
Anhui 139600.00 6461.00
Beijing 16410.54 1180.70
Chongqing 82400.00 3144.23
Shanghai 6340.50 1360.26
Zhejiang 101800.00 4894.00
------------------------------------
这题就是送分的,只需要在屏幕直接输出表格即可;
记得加上换行,如果不加的话,会提示格式错误。
#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
printf("------------------------------------\n");
printf("Province Area(km2) Pop.(10K)\n");
printf("------------------------------------\n");
printf("Anhui 139600.00 6461.00\n");
printf("Beijing