Advertisement
elektronek

Roman Kučera - Hrajeme si s číslama

Nov 29th, 2019
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void zapisPort(unsigned int cislo)
  4. {
  5.     printf("-------\n");
  6.     for (int a=16; a<=22; a++)
  7.     {
  8.         if  (cislo & (1<<(a-16))) printf("1"); else printf("0");
  9.     }
  10.     printf("\n");
  11. }
  12.  
  13. void main()
  14. {
  15.     unsigned int c=0;
  16.  
  17.     while(c<64) {
  18.         zapisPort(c);
  19.         c++;
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement