Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int foo();
- int nArr[3] = {3, 100, 2},
- n = 0;
- //////////////////////////////////////////////////////////
- int main()
- {
- scanf("%i", &nArr[0]);
- scanf("%i", &nArr[1]);
- scanf("%i", &nArr[2]);
- foo();
- foo();
- printf("%i, ", nArr[0]);
- printf("%i, ", nArr[1]);
- printf("%i ", nArr[2]);
- }
- ///////////////////////////////////////////////////////
- int foo()
- {
- if(nArr[0] > nArr[1])
- {
- n = nArr[0];
- nArr[0] = nArr[1];
- nArr[1] = n;
- }
- if(nArr[1] > nArr[2])
- {
- n = nArr[1];
- nArr[1] = nArr[2];
- nArr[2] = n;
- }
- return 0;
- }
- /*
- #include <stdio.h>
- //////////////////////////////////////////////////////////
- int main()
- {
- int nArr[3] = {100, 2222, 3};
- scanf("%i", &nArr[0]);
- scanf("%i", &nArr[1]);
- scanf("%i", &nArr[2]);
- printf("Dima %i\n", nArr[0]);
- printf("Danya %d\n", nArr[1]);
- printf("n = %d\n", nArr[2]);
- }
- */
- /*
- #include <stdio.h>
- //////////////////////////////////////////////////////////
- int main()
- {
- int nArr[3] = {100, 2222, 3};
- printf("Dima %i\n", nArr[0]);
- printf("Danya %d\n", nArr[1]);
- printf("n = %d\n", nArr[2]);
- }
- */
- // for(int i = 0; i < 3; i++) scanf("%d", &n);
- /*
- #include <stdio.h>
- //////////////////////////////////////////////////////////
- int main()
- {
- int n = 44;
- printf("n = %d", 77);
- scanf("%d", &n);
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement