#include <stdio.h>
int main( void ) {
int a, num, q, quantidade, primo;
//setlocale(LC_ALL, "Portuguese");
printf ( "Quantos número deseja ser informado: " ) ; scanf ( "%d" , & quantidade
) ;
for ( q= 1 ; q<= quantidade; q++ )
{
printf ( "Digite um número: " ) ;
primo= 0 ;
for ( a= 2 ; a< num; a++ )
{
if ( num % a == 0 ) {
primo++;
break ;
}
}
if ( primo
== 0 ) printf ( "%d É PRIMO.\n " , num
) ; else printf ( "%d NÃO É PRIMO.\n " , num
) ; }
return 0 ;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYSwgbnVtLCBxLCBxdWFudGlkYWRlLCBwcmltbzsKCiAgICAvL3NldGxvY2FsZShMQ19BTEwsICJQb3J0dWd1ZXNlIik7CgogICAgcHJpbnRmICgiUXVhbnRvcyBuw7ptZXJvIGRlc2VqYSBzZXIgaW5mb3JtYWRvOiAiKTsKICAgIHNjYW5mICgiJWQiLCAmcXVhbnRpZGFkZSk7CgogICAgZm9yIChxPTE7IHE8PXF1YW50aWRhZGU7IHErKykKICAgIHsKICAgICAgICBwcmludGYgKCJEaWdpdGUgdW0gbsO6bWVybzogIik7CiAgICAgICAgc2NhbmYgKCIlZCIsJm51bSk7CgogICAgICAgIHByaW1vPTA7CiAgICAgICAgZm9yIChhPTI7IGE8bnVtOyBhKyspCiAgICAgICAgewogICAgICAgICAgICBpZihudW0gJSBhID09IDApewogICAgICAgICAgICAgICAgcHJpbW8rKzsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBpZiAocHJpbW8gPT0gMCkgcHJpbnRmICgiJWQgw4kgUFJJTU8uXG4iLCBudW0pOwogICAgICAgIGVsc2UgcHJpbnRmICgiJWQgTsODTyDDiSBQUklNTy5cbiIsIG51bSk7CiAgICB9CiAgICAKCXJldHVybiAwOwp9Cg==