Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <stdio.h>
- #include <conio.h>
- #include <locale.h>
- #include <math.h>
- int main()
- {
- int m[5];
- int i, s = 0, d,p;
- for (i = 0; i<5; i++)
- {
- scanf("%d", &m[i]);
- }
- for (i = 0; i < 4; i++)
- {
- for (s = 0; s < 4-i; s++)
- {
- if (m[s]>m[s + 1])
- {
- d = m[s];
- m[s] = m[s + 1];
- m[s + 1] = d;
- }
- }
- }
- printf("%d", m[3]);
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement