Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- int main()
- {
- int first, last;
- int product = 1;
- printf("Program oblicza iloczyn wszystkich liczb nieparzystych calkowitych z przedzialu domknietego podanego przez uzytkownika \n\n Podaj granice przedzialu: ");
- scanf_s("%d %d", &first, &last);
- for (product = first; first <= last; first++, product = product * ((first*(first % 2)) | 1));
- printf("Iloczyn jest rowny: %d", product);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement