This document contains code examples in C and C++ that check if a user-input number is prime. The programs use a for loop to divide the number by integers from 1 to the number to count the number of factors, and then check if the count is equal to 2, meaning the number is prime, or not equal to 2, meaning the number is not prime.