- Fill in your name and GitHub username on top.
- Use the Notes section to add any notes to the instructor.
- The main lab description can be found here: https://maryash.github.io/135/labs/lab_02.html
Write this task as specified in the main lab. That is create a program named valid.cpp that completes the task.
Write a program that consists of two files, main.cpp
and
funcs.cpp
. You will also need a header file named funcs.h
(see the
class video for details).
In funcs.cpp
write a void
function named print_interval(int L,
int U)
that will accept two integer parameters and will print the
output as specified in the main lab. Test this function by calling it
from the main
function which should be defined in main.cpp
.
Make sure to include sufficient tests to from main
to show that this
works.
Recall that you can compile this program by typing g++ main.cpp
funcs.cpp
and then running ./a.out
.
NOTE: The program for this task should not ask for any keyboard input. The input test values should be hard coded in the program.
Write this task as specified in the main lab assignment.
Write this task as specified in the main lab assignment