Untitled
Never
#include <iostream> using namespace std; const int n = 2; struct Student { string imie; float ocena; }; void wczytaj(Student tab[n][n]) { for(int i = 0; i < n; ++i) for(int j = 0; j < n; ++j) { cout << "Podaj imie i ocene studenta: "; cin >> tab[i][j].imie >> tab[i][j].ocena; } cout << "Poprawnie wczytano tablice" << endl; } void odwroc_wiersz(Student tab[n][n], char znak, float grade) { for(int w = 0; w < n; ++w) { if(tab[w][0].imie[0] == znak && tab[w][0].ocena > grade) { // odwracanie wiersza for(int k = 0; k < n/2; ++k) swap(tab[w][k], tab[w][n-k-1]); } } } void drukuj_tab(Student tab[n][n]) { for(int i = 0; i < n; ++i) { for(int j = 0; j < n; ++j) cout << tab[i][j].imie << ' ' << tab[i][j].ocena << '\t'; cout << endl; } cout << endl; } int main() { Student A[n][n], B[n][n]; wczytaj(A); wczytaj(B); odwroc_wiersz(A, 'Z', 4); odwroc_wiersz(B, 'W', 3.5); drukuj_tab(A); drukuj_tab(B); return 0; }
Raw Text
-
Dalawang Beses Nilabasan at Pinutukan ng Tamod sa Bibig si MsLady!
12 min ago
-
Adult Telegram Channels
39 min ago
-
Wicked - Kenzie Taylor's Crazy, Intense Fuck
42 min ago
-
https://twor.microsoftcrmportals.com/forums/support-forum/6cf2361f-8e00-ef11-a73d-6045bd3fd1cb
47 min ago
-
rtrtytud gdfxchjghj
1 hour ago
-
GIRLSWAY - Femdom Kira Noir Turns Biggest Fan Angela White Into A Sex Addict For Being A Bad Critic!
1 hour ago
-
Adult Telegram channels
1 hour ago
-
pejejeje
1 hour ago
-
Apply These 5 Secret Techniques To Improve Smart Hemp Gummies Canada
CSS | 1 hour ago
-
dfyg hdtu gkgh
1 hour ago