Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- typedef struct
- {
- char nume[100];
- unsigned zi;
- int p, temp;
- } BUL;
- int main()
- {
- BUL b[100];
- int n, maxitemp = -1e3;
- cin >> n;
- for (int i = 0; i < n; i++)
- {
- getchar();
- gets(b[i].nume);
- cin >> b[i].p >> b[i].temp;
- b[i].zi = i + 1;
- if (maxitemp < b[i].temp)
- maxitemp = b[i].temp;
- }
- cout << "temperatura maxima:" << maxitemp << endl;
- for (int i = 0; i < n; i++)
- {
- if (maxitemp == b[i].temp)
- cout << b[i].zi << ' ' << b[i].nume << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement