Question: in C language only Write a program in any reasonably high-level language (Java/C++/C#/Swift/Python/Javascript/etc. Some language that's close to English), that reads in numbers from the

 in C language only Write a program in any reasonably high-level

in C language only

Write a program in any reasonably high-level language (Java/C++/C#/Swift/Python/Javascript/etc. Some language that's close to English"), that reads in numbers from the keyboard (standard input), one per line, until it detects that a 0 (zero not an 'oh') has been entered. The 0 does not count as part of the number series and indicates the end of the series (known as a 'sentinel value'). Your program will determine whether each entered number is a Prime or nonPrime (note this is not the same as a composite number, just an indication of "primeness" or not). It should print whether each value is prime or not to the standard output In this program, a prime number is any whole number greater than or equal to 2 that is not divisible by any values other than the number 1 and itself. Error Checking: Any line with multiple numbers on the line should accept the first number on the line only. Any blank lines should be ignored. At the end of the series, your program should print out the following info in this order: Total number of entries (not including skipped entries) Total number of prime number entries Total number of non-prime number entries The highest prime number entered (if any were entered). The lowest prime number entered. Here are some sample runs of my program named primeFinder: JLevy introAssign 4 >./primeFinder Explanation ./primeFinder This executes primeFinder in my current folder (Unix syntax) A blank line is entered (just enter/return key) 4 numbers are entered (note the 1) and assessed 1 is not prime according to the given definition 2 is prime according to the given definition 4 is not prime according to the given definition 97 is prime according to the given definition O ends the series The largest prime entered is 97 The total number of Non-Prime numbers entered: 2 The smallest prime entered is 2 The largest prime Number: 97 1 1 is Non-Prime! 2 2 is Prime! 3 3 is Prime! 4 4 is Non-Prime! 97 97 is Prime! The total entries: 5 The total number of Prime numbers entered: 3 The smallest prime Number: 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!