Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- float x = -12.257;
- int i=21, v=7;
- char antet[20] = "Anul 1 Fizica UBB";
- printf("\n1. %-5.2f\t%d", x, i/2);
- printf("\n2. %.13s\b", antet);
- printf("\n3. %13s", antet);
- printf("\n4. %d", v>>1);
- // 0101 = 2^0 * 1 + 2^1 * 0 + 2^2 * 1 + 2^3 * 0
- // 0010 = 2
- // 7/2=3 r 1
- // 3/2=1 r 1
- // 1/2=0 r 1
- // 0000 0111 >> 1 = 0000 0011 = 3
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement