Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ageCalculator.c #690

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ageCalculator.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ void year(int current_date, int current_month, int current_year, int birth_date,
calculated_date = current_date - birth_date;
calculated_month = current_month - birth_month;
calculated_year = current_year - birth_year;
printf("\nPresent Age\nYears: %d\tMonths: %d\tDays: %d\n",calculated_year, calculated_month, calculated_date);
printf("\nPresent Age\nYears : %d\tMonths: %d\tDays : %d\n",calculated_year, calculated_month, calculated_date);
}

int main()
{
printf("\nEnter Current Date Details (In Numerical Figures)\n");
printf("Enter Today's Date:\t");
printf("Enter Today's Date :\t");
scanf("%d", &current_date);
printf("Enter Current Month:\t");
printf("Enter Current Month :\t");
scanf("%d", &current_month);
printf("Enter Current Year:\t");
printf("Enter Current Year :\t");
scanf("%d", &current_year);
printf("\nEnter Your Birth Details (In Numerical Figures)\n");
printf("Enter Day:\t");
printf("Enter Day :\t");
scanf("%d", &birth_date);
printf("Enter Month:\t");
printf("Enter Month :\t");
scanf("%d", &birth_month);
printf("Enter Year:\t");
printf("Enter Year :\t");
scanf("%d", &birth_year);
year(current_date, current_month, current_year, birth_date, birth_month, birth_year);
return 0;
Expand Down