Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- ///////////////////////////////////////////////////
- struct TT
- {
- int nYear;
- float fH;
- }Dima, s[44];
- ///////////////////////////////////////////////////
- int main()
- {
- Dima.nYear = 1973 ;
- Dima.fH = 184.7;
- // printf("size of Dima = %d\n", sizeof(Dima));
- printf("nYear = %d, fH = %.2f\n", Dima.nYear, Dima.fH);
- }
- /*
- #include <stdio.h>
- ///////////////////////////////////////////////////
- int main()
- {
- double h = 1.00,
- s = 0.01,
- t ;
- for (int i = 0; i < 365; i++)
- {
- printf("day %d - ", i);
- t = h * s;
- h = t + h;
- printf("%.2f\n", h);
- }
- }
- */
- /*
- #include <stdio.h>
- void foo(int*);
- ////////////////////////////////////////////////////////
- int main()
- {
- int n = 77;
- printf(" n = %d\n ", n );
- printf("address n = %d\n\n", &n );
- foo(&n);
- printf(" n = %d\n", n );
- printf("address n = %d\n", &n );
- }
- /////////////////////////////////////////////////////
- void foo(int *p)
- {
- int &n = *p;
- n = n - 20;
- printf(" n2 = %d\n ", n );
- printf("address n2 = %d\n\n", p );
- }
- */
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement