Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int n = 5;
- float f = 7.997;
- ///////////////////////////////////////////////////////
- int main()
- {
- n = n + f;
- printf("n = %d \n", n);
- f = n * f;
- printf("f = %.3f \n", f);
- }
- //printf("n = %d \n", n);
- /*
- #include <stdio.h>
- ///////////////////////////////////////////////////////
- int main()
- {
- int n1 = 21;
- int n2 = 22;
- int n3 = 23,
- n4 = 24,
- nDima = 25,
- nOleg = 26,
- nMin = 27,
- nMax = 28, nGGG = 29, nAAA = 30;
- int *pnArr[11] = {(int*)9, &n1, &n2, &n3};
- printf("size = %d \n", sizeof(pnArr) );
- pnArr[ 4] = &n4 ;
- pnArr[ 5] = &nDima;
- pnArr[ 6] = &nOleg;
- pnArr[ 7] = &nMin ;
- pnArr[ 8] = &nMax ;
- pnArr[ 9] = &nGGG ;
- pnArr[10] = &nAAA ;
- for(int i = 1; i <= 10; i++)
- {
- printf("%d, ", *pnArr[ i] );
- }
- }
- */
- /*
- #include<stdio.h>
- int def(int *p);
- /////////////////////////////////////////////////////////////
- int main()
- {
- int nArr[9] = {10, 11, 12, 13, 14};
- def( nArr );
- }
- /////////////////////////////////////////////////////////////
- int def(int *p)
- {
- int size = 5;
- for (int i = size - 1; i >= 0; i--)
- {
- printf("%d, ", p[i]);
- }
- }
- */
- // int *p = nArr;
- //int *p = nArr[9];
- //def(&nArr[0]);
- /*
- 1) У Вас есть массив int nArr[9] = {10, 11, 12, 13, 14};
- 2) Передайте его адрес в функцию foo
- 3) Пусть функция foo распечатает его элементы в обратном порядке.
- */
- /*
- #include<stdio.h>
- int def(int *, int*);
- /////////////////////////////////////////////////////////
- int main()
- {
- int x = 7, // kllkjkljk
- y = 9; // opipoipioo jkhjkhjkh
- def(&x, &y);
- }
- /////////////////////////////////////////////////////////
- int def( int *p1, int*p2)
- {
- if(*p1 > *p2) printf("%d\n", *p1);
- else
- printf("%d\n", *p2);
- }
- */
- /*
- #include <stdio.h>
- ///////////////////////////////////////////////////////
- int main()
- {
- int n1 = 21;
- int n2 = 22;
- int n3 = 23,
- n4 = 24,
- nDima = 25,
- nOleg = 26,
- nMin = 27,
- nMax = 28, nGGG = 29, nAAA = 30;
- */
- /*
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "rus");
- cout << "Привет - Hello !" << endl;
- return 0;
- }
- */
- // ( )
- // ( )
- // ( )
- // ( )
- // ) )
- // ( ( /\
- // (_) / \ /\
- // ________[_]________ /\/ \/ \
- // /\ /\ ______ \ / /\/\ /\/\
- // / \ //_\ \ /\ \ /\/\/ \/ \
- // /\ / /\/\ //___\ \__/ \ \/
- // / \ /\/ \//_____\ \ |[]| \
- // /\/\/\/ //_______\ \|__| \
- // / \ /XXXXXXXXXX\ \
- // \ /_I_II I__I_\__________________\
- // I_I| I__I_____[]_|_[]_____I
- // I_II I__I_____[]_|_[]_____I
- // I II__I I XXXXXXX I
- // E-mail: dllbridge@gmail.com
- /*
- #include <stdio.h>
- ///////////////////////////////////////////////////////
- int main()
- {
- int n1 = 21;
- int n2 = 22;
- int n3 = 23,
- n4 = 24,
- nDima = 25,
- nOleg = 26,
- nMin = 27,
- nMax = 28, nGGG = 29, nAAA = 30;
- int *pnArr[11] = {(int*)20, &n1, &n2};
- pnArr[ 3] = &n3 ;
- pnArr[ 4] = &n4 ;
- pnArr[ 5] = &nDima;
- pnArr[ 6] = &nOleg;
- pnArr[ 7] = &nMin ;
- pnArr[ 8] = &nMax ;
- pnArr[ 9] = &nGGG ;
- pnArr[10] = &nAAA ;
- for(int i = 1; i <= 10; i++)
- {
- printf(" %d\n", *pnArr[i]);
- }
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement