Generation

generate functionSun, 26 Mar 2023

numero primo

bool primo(int n) { int i; bool primo = true; for ( i = 2; i < n; i++ ) { if ( n % i == 0 && n % n == 0 ) { return false; } } return true; } primo(12)

Questions about programming?Chat with your personal AI assistant