⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getpoints.c

📁 Travelling saleman by C++
💻 C
字号:
/* *  getpoints.c *   * Phil Cox, B00XXXXXX * Login: pcox * CSCI2132: Assignment 3 * */#include <stdlib.h>#include <stdio.h>#include "list.h"struct node *getpoints(void){	/* Read coordinates from standard input 	   and construct a linked list of points */		struct node *points=NULL, *new;	double x, y;		while(scanf("%lf%lf",&x,&y) != EOF)		if ((new = malloc(sizeof(struct node))) == NULL)			return(NULL);		else {			new->x = x;			new->y = y;			new->next = points;			points = new;		}	return(points);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -