Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

image text in transcribed

image text in transcribed

output should look like this

Enter the year you were born: 197e ou are 48 years old Press any key to continue 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

recognise typical interviewer errors and explain how to avoid them

Answered: 1 week ago

Question

identify and evaluate a range of recruitment and selection methods

Answered: 1 week ago

Question

understand the role of competencies and a competency framework

Answered: 1 week ago