Question: Indivisible Numbers Write a C program indivisible.c which reads integers> 1 from standard input until it reaches end-of-input. It should then print the integers read

Indivisible Numbers Write a C program indivisible.c which reads integers> 1 from standard input until it reaches end-of-input. It should then print the integers read which are not exactly divisible by any other of the integers read In other words it should not print an integer if another integer that has been read is a factor of that number. You may assume that the program's input will contain only positive integers one per line. You may assume that all integers are > 1 You can assume at most 1000 integers will be read before end-of-input is reached. Match the the example below EXACTLY /indivisible 42 7 12 ctrl-d Indivisible numbers: 7 6 /indivisible 2 4 8 10 Ctrl-o Indivisible numbers: 2 3 5 ? ./indivisible Ctrl-d Indivisible numbers: 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
