Karta pracy nr 1

#include
using namespace std;
int main()

{

float a,b;

cout<<"podaj swoja wage:";

cin>>a;

cout<<"podaj wage kolegi";

cin>>b;

cout<<"Suma wag wynosi "<< a+b

return 0;

}

Zadanie 2

#include

using namespace std;

int main()
{
    int w;
    cout <<"Co chcesz zrobic?"<<"1. Oblicz pole prostokata"
    << endl <<"2. Oblicz sume wag" << endl;
    cin>>w;
    if(w==1);
    {
    int a;
    int b;
    cout<<"podaj dlugosc boku a"<< endl;
    cin>>a;
    cout<<"Podaj dlugosc boku b"<< endl;
    cin>>b;
    int c;
    c=a*b;
    cout <<"Pole prostokata wynosi "<< c << endl;
    }
    else
     {
    int a;
    int b
    int c;
    cout<<"Podaj mase pierwszej osoby"<< endl;
    cin>>a;
    cout<<"podaj mase drugiej osoby"<< endl;
    cin>>b;
    c=a+b;
    cout<<"Suma wag wynosi "<< c << "kg" << endl;
     }

    return 0;
}

zadanie 3

#include <iostream>

using namespace std;

int main()
{
    int x;
    int y;
    cout << "Obliczam funkcje y=5*x^3+4*x^2+3*x" << endl;
    for (x=1;x<=10;x++)
    {
        y=5*x*x*x+4*x*x+3*x;
        cout << "x=" << x << " y=" << y << endl;
    }
    return 0;
}