Program Console Vignaankosh.com
Execution Panel
Console is empty.
Find first prime number in range using break is an interactive C dry run visualizer from the Control programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.
This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.
#include <stdio.h>
int main() {
int num, i;
for(num = 10; num <= 30; num++) {
int isPrime = 1;
for(i = 2; i < num; i++) {
if(num % i == 0) {
isPrime = 0;
break; // exit inner loop when divisor found
}
}
if(isPrime) {
printf("First prime = %d", num);
break; // exit outer loop when prime found
}
}
return 0;
}