write a C program to print prime number from 2 to n, using nested while loop.
pls answer
Answers
Answered by
0
Answer:
Outer while loop selects a number for each iteration and stores inside variable start. Inner while loop checks if the selected value(present in variable start) is prime or not. If its a prime number then the variable prime will have value of 1 or else it’ll have value 0 inside it(after completion of inner while loop iteration). If the value present in variable prime is 1, then we print the value present in variable start on to the console window.
Answered by
0
Explanation:
to perform a task, etc. or to put a plan into action
Similar questions