亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

請問這個要怎么辦?

請問這個要怎么辦?

C
ZXJ03 2016-05-13 23:05:59
#include?<stdio.h> #include?<malloc.h> #define?OK?1 #define?ERROR?0 typedef?int?status; typedef??struct??Subject ?{?float?score; ???char??course; ??struct?Subject?*next; ?}Subject,*SList; status?create_S(SList?&L) ?{??SList?p;?int?i,n;?????????? ?????L=(Subject?*)malloc(sizeof(Subject)); ?L->next=NULL;?? ?printf("Input?the?element?number:"); ?scanf("%d",&n); ?????printf("Input?the?element?value?reversing:\n"); ?for?(i=n;i>0;--i)? ???????{??p=(Subject?*)malloc(sizeof(Subject)); ??????????scanf("%s,%f",&p->course,&p->score); ??????p->next=L->next; ??????????L->next=p;?}? ?printf("The?linklist?as?follow:\n"); ?????for?(i=0;i<n;++i) ?{?printf("%s,%f\n",&p->course,&p->score); ???p=p->next; ?} ?printf("\n"); ?return?OK; }? void?main(){ SList?head; create_S(head); }結果是這樣,請問哪里出錯了?要怎么改?
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 1206 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號