Question: In C code please, You need to write aprogram that will read a sequence of integers from the standard input. For each integer greater than
In C code please,

You need to write aprogram that will read a sequence of integers from the standard input. For each integer greater than 1, the program will test whether it is a prime number and print the result. The program will end the first time it reads a number which is 1 or less than 1 Input The input consists of a squence of integers separated by whitespace, such as spaces or newlines, and it is guaranteed that at least one of those numbers is 1 or less than 1 Output For each number n from the input, where n > 1, the program will print the following line if n is prime: n IS PRIME or the following line if n is not prime n IS NOT PRIME Sample input and output are given below: Sample Input Sample Outpu 3 IS PRIME 9 IS NOT PRIME 17 IS PRIME 13 IS PRIME 17 13 1 Sample Output, with visualized whitespace 3 IS PRIME 9-1S.NOTCPRIME 17 IS-PRIMEL 13 IS PRIMEE Note: is a space, and is a newline character
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
