SHARE
TWEET

Untitled

a guest Nov 22nd, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <conio.h>
  3.  
  4. int main()
  5. {
  6.     int first, last;
  7.     int product = 1;
  8.     printf("Program oblicza iloczyn wszystkich liczb nieparzystych calkowitych z przedzialu domknietego podanego przez uzytkownika \n\n Podaj granice przedzialu: ");
  9.     scanf_s("%d %d", &first, &last);
  10.     for (product = first; first <= last; first++, product = product * ((first*(first % 2)) | 1));
  11.     printf("Iloczyn jest rowny: %d", product);
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top