Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NOTE : C++ programming. i need a help with this code . the instructions and the sanitycheck file are below. Instructions: sanitycheck file: ( what
NOTE : C++ programming. i need a help with this code . the instructions and the sanitycheck file are below. Instructions:
sanitycheck file: ( what it suppose to show after running the sanity check) . please it has to pass the sanity check (Not only compiles).
This time around, your program will not be so chatty. The program just wait for you to type an integer, and then print a 0 or 1 to indic whether or not that integer was prime. Here's some sample output of interactive session (assuming primetest is the name of the executable!) $ ./primetest 21 12 After 11 the response is 1, indicating primality after the response is meaning it is not prime. You can end the interactive session by hittin ctrl-D, or by entering something that is not an integenvike the characte a. Important note: your program is not supposed to print an messages! It is just supposed to read from standard input, and writ zeros and ones to standard output. The next section will explain wh this is a good idea. primetest.cpp 2 sanitycheck.sh 3 small test memory usage unimportant, 4 test Sesomenumbers 5 rightanswer right answers youranswer/primetest somenumbers 8 fail couns 9 _O# now just compare the differences: il for (( = 0;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started