Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main (int argc, char** argv) {
- int broj, p=2;
- printf("broj: ");
- scanf("%d", &broj);
- if (broj < 0) broj = -broj;
- if (broj == 0) return 0;
- printf("1");
- while(broj>1) {
- if (broj%p == 0) {
- printf("*%d", p);
- broj /= p;
- }
- else
- p++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement