Book Structure and Information Output

Swift Easy structs

Task «Book Structure and Information Output»

Create a structure Book with fields title (String), author (String) and year (Int). Write a program that reads three lines: the book title, author and year of publication, creates an instance of the Book structure and outputs information in the format "Title: <title>, Author: <author>, Year: <year>".

Input Format

Three lines: the first is the book title, the second is the author, the third is the year of publication (an integer).

Output Format

String format: "Title: <title>, Author: <author>, Year: <year>".

main.swift