Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- #include <stdio.h>
- #include <locale.h>
- ///////////////////////////////////////////////
- int main() //
- {
- setlocale(LC_ALL, "rus");
- int number, // kljlkjlkj
- price, // ioioi
- summa;
- printf("Введите количество книг: "); scanf("%d", &number);
- for (int i = 0; i <= number; i++)
- {
- printf("%d books: ", i);
- if (i == 0)
- {
- price = 0;
- }
- else if (i % 8 == 0 || i == 1)
- {
- price = 1000;
- }
- else
- {
- price -= 55;
- }
- summa += price;
- printf("%d\n", summa);
- }
- return 0;
- }
- */
- #include <stdio.h>
- char sz[19] = "SONY Pictures";
- /////////////////////////////////////////////////////////////
- int main() //
- {
- sz[2] = '4' ;
- sz[9] = '\0' ;
- printf("%s \n", sz);
- for(int i = 0; i < 19; i += 1)
- {
- printf("%d \n", sz[i]);
- }
- }
- /*
- #include <stdio.h>
- void foo(int *);
- /////////////////////////////////////////////////////////////
- int main() //
- {
- int nArr[12];
- foo(nArr);
- }
- ////////////////////////////////////////////////////////////
- void foo(int *nArr)
- {
- printf("address of nArr[0] = %d\n", nArr );
- printf("address of nArr[0] = %d\n", &nArr[3] );
- }
- */
- /*
- #include <stdio.h>
- int n = 71;
- int *p = &n;
- /////////////////////////////////////////////////////////////
- int main() //
- {
- printf("address of n = %d\n", p );
- printf("address of n = %d\n", &n );
- printf("address of p = %d\n", &p );
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement