Question
using visual studio , write a c program using printf , scanf start with #include #include Prompt the user to enter the year that they
using visual studio , write a c program using printf , scanf
start with
#include
#include
Prompt the user to enter the year that they were born.
Calculate and output how old they are.
Dont worry about month/day they were born, just do a simple calculation using the current year (2018).
Using if statements, catch and output the following conditions:
If they are born after 2018, print that they input an incorrect value.
If they are over 122 years old, print that they have set a new record with their age.
These are the only two required, but feel free to add more data validation statements if you want.
output should look like this
Enter the year you were born: 197e ou are 48 years old Press any key to continue 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started