Advertisement
madopew

Untitled

Nov 27th, 2019
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.76 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     FILE *pFile;
  5.     pFile = fopen("okt_out.txt", "w");
  6.     fprintf(pFile, "a\tb\tc\td\te\tres\n");
  7.     for(int a = 0; a < 2; a++)
  8.         for(int b = 0; b < 2; b++)
  9.             for(int c = 0; c < 2; c++)
  10.                 for(int d = 0; d < 2; d++)
  11.                     for(int e = 0; e < 2; e++)
  12.                         fprintf(pFile, "%d\t%d\t%d\t%d\t%d\t %d\n", a, b, c, d, e, ((a||b||c||d||e)&&(a||b||c||!e||d)&&(a||b||c||!d||!e)&&(a||b||!c||d||e)&&(a||b||!c||d||!e)&&(a||!b||c||d||e)&&(a||!b||c||!d||!e)&&(a||!b||!c||d||e)&&(a||!b||!c||d||!e)&&(a||!b||!c||!d||e)&&(!a||b||c||d||e)&&(!a||b||c||!d||!e)&&(!a||b||!c||d||!e)&&(!a||!b||c||d||e)&&(!a||!b||!c||d||!e)&&(!a||!b||!c||!d||e))); //formula
  13.     fclose(pFile);
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement