热门

最新

红包

立Flag

投票

同城

我的

发布
sinat_39633282
RadioSpark
5 年前
truesinat_39633282

今天周三 1930 微软直播 go 语言的编程基础 https://live.bilibili.com/h5/21704593

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
后续ing#include<stdio.h>#include<stdlib.h>typedef struct NODE{ int x; struct NODE*nextptr;}node;node *headptr,*currentptr,*lastptr;int main(){ int num,max,min,sum; sum=0; headptr=NULL; scanf("%d",&num); max=num; min=num; while(num!=-1){ currentptr=(node*)malloc(sizeof(node)); if(currentptr!=NULL){ currentptr->x=num; sum=sum+num; if(num>max) max=num; else if(num<min) min=num; } if(headptr=NULL){ headptr=currentptr; } scanf("%d",&num); } printf("The maximum,minmum and the total are:%d %d %d",max,min,sum); return 0;}
立即登录