Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int num,count=0;
- printf("Entre com o numero :\n"); scanf("%d",&num);
- if (num%2 == 0)
- {
- printf("O numero eh divisivel por 2!\n"); count++;
- }
- if (num%3 == 0)
- {
- printf("O numero eh divisivel por 3!\n"); count++;
- }
- if (num%5 == 0)
- {
- printf("O numero eh divisivel por 5!\n"); count++;
- }
- if (num%7 == 0)
- {
- printf("O numero eh divisivel por 7!\n"); count++;
- }
- else if(count == 0)
- {
- printf("O numero nao eh divisivel por nenhum dos numeros do sistema!\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment