Page 1 of 1

Question 2 Part of program development is the visualization of the program using a flowchart Draw the flowchart for the

Posted: Sun May 15, 2022 1:57 pm
by answerhappygod
Question 2 Part Of Program Development Is The Visualization Of The Program Using A Flowchart Draw The Flowchart For The 1
Question 2 Part Of Program Development Is The Visualization Of The Program Using A Flowchart Draw The Flowchart For The 1 (26.45 KiB) Viewed 59 times
Question 2 Part of program development is the visualization of the program using a flowchart Draw the flowchart for the following program that determines iſ a given value of n is a prime number Winclude <iostream> using namespace std; int main() 1 //variable declaration int n; int flag = 0; //prompt user for input cout << "Enter an integer > 1: "; cin >> 7/iterate from 2 to n/2 for(int count-2: countcont2: count++) //in is divisible by any from 2 to n/2 //it is not a prime if (nacount -- 0) flag - 1; break; //output result if (flag - 0) cout <<n «" is a prime number\n"; else cout <<n<<" is not a prime number\n"; return 0; (10 marks) 3