Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int n = 2;
- int *p = &n;
- ////////////////////////////////////////////////////////////// //
- int main()
- {
- printf(" n = %2d \n", n);
- printf(" p = %2d \n", p);
- printf("&n = %2d \n", &n);
- printf("*p = %2d \n", *p);
- }
- /*
- #include <stdio.h>
- int n = 2;
- ////////////////////////////////////////////////////////////// //
- int main()
- {
- int i = 1;
- L_01:
- printf("%d * %d = %2d \n", i, n, i*n);
- i++;
- if(i < 10) goto L_01;
- }
- */
- /*
- #include <stdio.h>
- int nMonth = 26;
- ////////////////////////////////////////////////////////////// //
- int main()
- {
- if(nMonth > 0)
- if(nMonth < 13)
- {
- if(nMonth == 5) printf("May \n");
- if(nMonth == 6) printf("June\n");
- } else printf("Error\n");
- }
- */
- // if(nMonth < 1 || nMonth > 12) printf("Error\n");
- /*
- switch(nMonth)
- {
- case 5: printf("May\n");
- break;
- case 6: printf("June\n");
- break;
- default: printf("Error\n");
- }
- */
- /*
- int nMonth = 5;
- ////////////////////////////////////////////////////////////// //
- int main()
- {
- int n = 54;
- int ost = n%7;
- printf("ost = %d\n", ost);
- }
- */
- /*
- #include <stdio.h>
- int nMonth = 5;
- ////////////////////////////////////////////////////////////// //
- int main()
- {
- // if(nMonth == 5) printf("May\n");
- // if(nMonth == 6) printf("Junr\n");
- switch(nMonth)
- {
- case 5: printf("May\n");
- break;
- case 6: printf("June\n");
- break;
- default: printf("Error\n");
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement