Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- struct Figury{
- string nazwa;
- int lb; //lb - liczba boków
- double pp; // pp - pole powierzchni
- Figury *nast;
- };
- const int n = 3;
- void lista (int ilosc_figur, string nazwa_figury, int liczba_bokow, double pole_powierzchni){
- for (int i=0; i<ilosc_figur; i++){
- cout<<"Podaj nazwe figury: \n";
- cin >> nazwa_figury;
- cout<<"Podaj liczbe bokow figury: \n";
- cin >> liczba_bokow;
- cout<<"Podaj pole powierzchni figury: \n";
- cin >> pole_powierzchni;
- }
- };
- int main(int argc, char *argv[])
- {
- string nazwa;
- int lb;
- double pp;
- cout << "Wprowadz dane \n";
- lista(n, nazwa, lb, pp);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement