Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * test.c
- *
- * Created on: Dec 12, 2019
- * Author: cdamian
- saallzzooocct
- CNP = 1980606123456
- = 5061106123456
- 0123456789012
- lunaNasterii = cnp[3] * 10 + cnp[4]
- 1
- 2631
- 8426 8421
- ---- ----
- 7654 3210__
- baza 10: 45 4554 = 400000 + 5 * 10000 +
- baza 2:0010 0010 = 0 * x + 32 + 2 = 34
- 0110 0100 = 64 + 32 + 4 = 100
- 0110 0110 = 102
- */
- #include<stdio.h>
- int main(){
- // char c = 100; // 110 0100 - 100 - 'd'
- // c = 'f'; // 110 0110 - 102 - 'f'
- //
- // char test = c + 2; // test = 104 = 'h'
- //
- // printf("%c - %d - %x\n", test, test, test);
- //
- //
- // char test1 = 0; //
- // char test2 = '0'; //
- //
- //
- // int n1 = test1 * 7;
- // int n2 = test2 * 7;
- //
- // printf("%d %d\n", n1, n2);
- /*
- * a. 0 0
- * b. 0 7
- * c. 7 0
- * d. 336 0
- * e. 0 336
- * f. 00000000 '0''0''0''0''0''0''0''0'
- * g.
- *
- */
- char cnp[14];
- char cnp2[] = "1981206123456";
- int lunaNasterii;
- // printf("Dati CNP: ");
- // scanf("%s", cnp);
- lunaNasterii = (cnp2[3] - '0') * 10 + cnp2[4] - '0';
- printf("luna nasterii: %d\n", lunaNasterii);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement