Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "bits/stdc++.h"
- //speed coding
- #define loop(i, x, n) for (int i = x; i < n; i++)
- using namespace std;
- int main() {
- ios::sync_with_stdio(0);
- cin.tie(0);
- #ifdef DEBUG
- freopen("text.txt", "r", stdin);
- #endif
- // 7
- const int n = 5;
- double b[n];
- loop(i, 0, n) cin >> b[i];
- int j = 0;
- loop(i, 0, n){
- if(b[i] == 0){
- swap(b[i], b[j]);
- j++;
- }
- }
- for(auto i : b){
- cout << i << " ";
- }
- cout << "\n";
- // max(1, 2, 3)
- int a1, a2, a3;
- cin >> a1 >> a2 >> a3;
- cout << (a1 > a2 ?( a1 >= a3 ? a1 : a3 ):( a2 >= a3 ? a2 : a3));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment