Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cstdlib>
- using namespace std;
- struct pacjenci{
- string imie;
- int ID,wiek,waga;
- };
- int main()
- {
- pacjenci dane[50];
- int ip;
- cout << "Podaj ilu bedzie pacjentow" << endl;
- cin >> ip;
- for (int i=0; i<ip;i++){
- cout<<"podaj informacje o pacjencie nr: " <<i+1<<endl;
- cout << "podaj imie pacjenta ";
- cin>>dane[i].imie;
- cout<<endl;
- cout << "podaj wiek pacjenta ";
- cin>>dane[i].wiek;
- cout<<endl;
- cout<<"podaj wage pacjenta ";
- cin >>dane[i].waga;
- dane[i].ID==i;
- cout<<endl;
- }
- for (int i=0;i<ip;i++){
- cout<<"dane o pacjencie nr "<<i+1<<":"<<endl;
- cout<<"Imie:"<<dane[i].imie<<endl;
- cout<<"Wiek:"<<dane[i].wiek<<endl;
- cout<<"Waga:"<<dane[i].waga<<endl<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement