Ex. 7.1 — Simple I/O in C++

Ex. 7.1 — Simple I/O in C++

You cannot submit for this problem because the homework's deadline is due.

File

Sample Makefile and CMakelists for cpp has been uploaded to canvas (under extra folder). Also, you need to use cpp template for hw7 (under extra folder)

GNUMake

If you choose GNUMake, then you should compress assignment.h, ex1.cpp, ex2.cpp, ex4.cpp, main.cpp, Makefile directly into a zip and submit this zip. (A sample Makefile for hw7 is uploaded on Canvas).

If you just finished ex1 and you immediately want to test whether your ex1 is working correctly. You need to modify your main.cpp, assignment.h, Makefile and then compress main.cpp,assignment.h,Makefile,ex1.cpp into a zip and submit this zip.

The sample Makefile on Canvas has -o main, do not change this main!

CMake

If you choose CMake, then you should compress assignment.h, ex1.cpp, ex2.cpp, ex4.cpp, main.cpp, CMakeLists.txt directly into a zip and submit this zip. (A sample CMakeLists.txt for hw7 is uploaded on Canvas).

If you just finished ex1 and you immediately want to test whether your ex1 is working correctly. You need to modify your main.cpp, assignment.h, CMakeLists.txt and then compress main.cpp,assignment.h,CMakeLists.txt,ex1.cpp into a zip and submit this zip.

The sample CMakeLists.txt on Canvas has add_executable(main ..., do not change this main! Also, do not change cmake_minimum_required(VERSION 2.7)

Description

Write a short C++ program which prompts the user for the current year, the user’s current age, and another year. The program should calculate the age that the user was or will be in the second year entered.

Format

Input

three lines, the current year on the first, the current age on the second, and the other year
on the third

Output

one line showing the calculated age

Sample 1

Input

2018
18
2019

Output

19

Limitation

1s, 32MiB for each test case.

Homework 7 (Individual)

Not Claimed
Status
Finished
Problems
4
Open Since
2019-11-17 00:00
DDL
2019-11-20 23:59
Extension
72.0 hour(s)