#include<stdio.h>#include<string.h>struct web{?char abbr[20];?char fullname[40];?char url[100];};struct web *GetWeb(int n);struct web *GetWeb(int n){?int i;?struct web myweb[n],*p = &myweb[0];?for(i=0;i<n;i++)?{??scanf("%s %s %s",myweb[i].abbr,myweb[i].fullname,myweb[i].url);?}?return p;} int main(void){?int n,i;?struct web *p;?printf("Please input the number of the pages you want to enter:");?scanf("%d",&n);?p=GetWeb(n);?for(i=0;i<n;i++)?{??printf("%-20s%-40s%s\n",(*(p+i)).abbr,(*(p+i)).fullname,(*(p+i)).url);?}}
- 0 回答
- 0 關(guān)注
- 1120 瀏覽
添加回答
舉報
0/150
提交
取消