Yeah. its just an example from a textbook. You can change it to 0-6 and it'll pick up on of the primes. But, we set it to 10 to examine how asserts work.
Yes. I have the error, that wasnt...
Type: Posts; User: Matamoros123
Yeah. its just an example from a textbook. You can change it to 0-6 and it'll pick up on of the primes. But, we set it to 10 to examine how asserts work.
Yes. I have the error, that wasnt...
Oh I understand now!!!! What assert declares is the range, not the condition to crash to! What I mean is, I thought it meant if its greater then or equal to zero, CRASH! But what it really means is,...
#include <iostream>
#include <assert.h>
using namespace std;
const int N_Primes = 7; // Number of Primes
int primes[N_Primes] = {2, 3, 5, 7, 11, 13, 17};
int main( )
{
Thank you! You are a life saver!!!
I am reading through a C++ book, and for one of the tutorials I must write a program that displays my Name, Social Security, and Date of Birth. Sounds easy enough, right? Well, I want a program that...