Question: (REGARDING YOUR COMMENT, DOCTEST , The doctest package and documentation can be found here: (chegg does not allow to post links so please go to
(REGARDING YOUR COMMENT, DOCTEST , The doctest package and documentation can be found here: (chegg does not allow to post links so please go to github and then go to flycats2000/doctest.h and click doctest.h to see the long long code for doctest.h that needs to work with all the other files.
I hope this helps
if you do not mind me sending the link, leave i comment and i will send the link to make it easier for you because i do not want to be in trouble with chegg but follow above directions and you should find the code for doctest which is important for everything to run.
IMPORTANT, MAKE SURE TO HAVE MAKEFILE FUNCS.CPP FUNCS.H AND TESTS.CPP
This assignment requires that you implement doctest based tests. There is already a skeleton Makefile with targets for main and tests as well as skeleton .c .h and doctest.h files.
For each function specified in the main lab, add the code to funcs.h and funcs.cpp. You should call them from main but you also need to put in tests into tests.cpp.
I will test main but will only consider tests.cpp to determine if your functions area all working properly. You will have to make sensible decisions based on the assignment as to how many tests you need and what you should test for.
Note: Remember that your program (including tests) should not ask for any keyboard input. When run it should clearly show that all tasks are implemented and work.
Do the following 2 tasks:

Using doctest.h as a file which is already given and a very long file, use it as a platform to make tests.cpp which is to determine if your functions area all working properly, and for each tasks add the function/code to funcs.cpp and funcs.h, while also calling it from main.
Some parts may be confusing, leave a comment if you do not understand, please make sure you complete the 2 tasks well and the code compiles and send a screenshot of output too, make sure all functions are implemented well.
PLEASE ANSWER WELL, I HAVE ASKED THIS BEFORE BUT CODE DOESNT RUN, MAKE SURE IT CAN WORK WITH THE DOC TEST FILE I SENT, THE DOC TEST IS VERY LONG SO KEEP THAT IN MIND
PLEASE SEND A SCREENSHOT OF YOUR OUTPUT SO I KNOW IT WORKS FOR YOU BECAUSE PREVIOUSLY THEY SEND CODES THAT JUST DOESNT WORK
check doctest well, make sure it compiles and make sure all these files together can run
Task A. Is divisible? Write a program numbers.cpp that defines a function boolisDivisibleby(intn,intd); If n is divisible by d, the function should return, otherwise return For example: isDivisibleBy(100,25)==trueisDivisibleBy(35,17)==false The program should also have a main function that tests your code. For example, it can ask the user to input two integer numbers and print Yes if the first number is divisible by the second, otherwise print No . Task B. Is a prime? A prime number is an integer greater or equal to 2 that is only divisible by 1 and by itself. The first few primes are: 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47 N is a prime if and only if it is not divisible evenly by any of the numbers from 2 to N1. Let's implement this decision as a function. In the same program , add a function isprime(intn); The function should return if n is a prime, otherwise return . Change the function to test your new code. Task A. Is divisible? Write a program numbers.cpp that defines a function boolisDivisibleby(intn,intd); If n is divisible by d, the function should return, otherwise return For example: isDivisibleBy(100,25)==trueisDivisibleBy(35,17)==false The program should also have a main function that tests your code. For example, it can ask the user to input two integer numbers and print Yes if the first number is divisible by the second, otherwise print No . Task B. Is a prime? A prime number is an integer greater or equal to 2 that is only divisible by 1 and by itself. The first few primes are: 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47 N is a prime if and only if it is not divisible evenly by any of the numbers from 2 to N1. Let's implement this decision as a function. In the same program , add a function isprime(intn); The function should return if n is a prime, otherwise return . Change the function to test your new code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
