//// main.c// test_a8//// Created by dezhu on 2021/12/28.// Copyright © 2021年 dezhu. All rights reserved.//#include <stdio.h>int main(int argc, const char * argv[]) { // insert code here... struct date{ int year; int month; int day; }; struct date today; today.year = 2020; today.month = 04; today.day = 20; printf("%i.%i.%i",today.year,today.month,today.day); system("pause"); printf("Hello, World!\n"); return 0;}
//// main.c// test_a9//// Created by dezhu on 2021/12/28.// Copyright © 2021年 dezhu. All rights reserved.//#include <stdio.h>int main(int argc, const char * argv[]) { // insert code here... struct date{ int year; int month; int day; }; struct date days[3]={ {2020,04,20}, {2020,05,20}, {2020,06,20} }; printf("%i.%i.%i",days[2]); system("pause"); printf("Hello, World!\n"); return 0;}
//// main.c// test_a10//// Created by dezhu on 2021/12/28.// Copyright © 2021年 dezhu. All rights reserved.//#include <stdio.h>int main(int argc, const char * argv[]) { struct date{ int year; int month; int day; }; struct days{ struct date yesterday; struct date today; struct date tomorrow; }; struct days one[2]={ {{2020,04,19}}, {{2020,04,20}} }; printf("%i.%i.%i",one[1]); return 0;}
//// main.c// test_a11//// Created by dezhu on 2021/12/28.// Copyright © 2021年 dezhu. All rights reserved.//#include <stdio.h>int main(int argc, const char * argv[]) { // insert code here... union date{ int year; int month; int day; }today; //struct date today; today.year = 2020; today.month = 04; today.day = 20; printf("%i.%i.%i",today.year,today.month,today.day); system("pause"); printf("Hello, World!\n"); return 0;}