Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i,j,counter = 0,num1,num2;
- printf("Entre com dois numeros par ao intervalo :\n");
- scanf("%d %d",&num1,&num2);
- for (i = num1+1; i < num2; i++)
- {
- for (j = 2; j < i ; j++)
- {
- if (i%j == 0)
- {
- counter = 1;
- }
- }
- if (counter == 0)
- {
- printf("%d\n",i);
- }
- counter = 0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment