C language: Write a program to convert your age into days, regardless of leap years.

Idea: two variables age and days, the user enters the age, multiplied by 365 is the number of days.

#include<stdio.h>
int main()
{
    
    
	int age, days;
	printf("Please input your age.\n");
	age = scanf ("%d", &age);
	days = 365 * age;
	printf("Your have had %d days", &days);
	return 0;
}

おすすめ

転載: blog.csdn.net/winds_tide/article/details/107413934#comments_27698898