#include <stdio.h> #define SIZE 31 typedef struct { int year; char make[SIZE]; char model[SIZE]; char color[SIZE]; int doors; int cylinders; int miles; } Car; Car readOneCar(int year) { Car c; c.year = year; scanf("%s", c.make); scanf("%s", c.model); scanf("%s", c.color); scanf("%d", &c.doors); scanf("%d", &c.cylinders); scanf("%d", &c.miles); return c; } void printOneCarToHTML(Car c) { printf("<h3>%d %s %s</h3>\n", c.year, c.make, c.model); printf("Color %s<br>\n%d doors<br>\n%d cylinders<br>\n%d miles<br>\n", c.color, c.doors, c.cylinders, c.miles); } int main(void) { int year; printf("<html><body>\n"); scanf("%d", &year); while (year != -1) { printOneCarToHTML(readOneCar(year)); scanf("%d", &year); } printf("</body></html>\n"); return 0; }