1.15. C and C++ΒΆ

Now for the most famous program of all time! This program is often the first program someone will write in a new language. Here it is presented in the original C language!

You can also have C++ code in an activecode.

Before you keep reading...

Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.

1.16. Unit Tests in C++ΒΆ

You can also have hidden unit tests in C++ using catch.hpp. Place the unit tests after β€˜====’.

Write a function to compute the factorial of a. number

You have attempted 1 of 5 activities on this page