Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int first,last,i;
- printf("Entre com o intervalo :\n");
- scanf("%d %d",&first,&last);
- printf("Intervalo completo :\n");
- for (i = first; i <= last; i++)
- {
- printf("%d ",i);
- }
- printf("\n\n");
- printf("Numeros impares :\n");
- for (i = first; i <= last; i++)
- {
- if (i%2 != 0)
- {
- printf("%d ",i);
- }
- }
- printf("\n\n");
- printf("Numero impares multiplos de 3 :\n");
- for (i = first; i <= last; i++)
- {
- if ((i%2 != 0)&&(i%3 == 0))
- {
- printf("%d ",i);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment