Wyszukiwanie


Kontakty

Pablino

E-mail: pabllino@wp.pl

Karta pracy kompilator Code::Blocks

Zad. 1.

#include

using namespace std;

int main()
{
    float a,b;

    cout << "Podaj wage 1 kolegi";
    cin >> a;
    cout<<"Podaj wage 2 kolegi";
    cin>>b;
    cout<<"Suma wag wynosi"<< a+b;
    return 0;
}

 

 Zad.2.

#include <iostream>
using namespace std;
int main()
{int w;
cout <<"Co chcesz zrobic?"<< endl <<"1. Oblicz pole prostokata" <<endl<< "2.Oblicz mase kolegow"<<endl;
cin >> w;
if (w==1)
{
int a;
int b;
cout << "Podaj dlugosc boku a" <<endl;
cin>>a;
cout << "POdaj długosc 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 pierwszego kolegi"<<endl;
cin>>a;
cout << "Podaj mase drugiego kolegi" <<endl;
cin >>b;
c=a+b;
cout <<"Koledzy waza razem "<<c<<"kg"<<endl;
}
return 0;
}

Zad.3

#include


using namespace std;
class petla
{
    public:
    int a, b, licznik;
};
int main()
{
    petla ja;
    cout<<"oblicznie funkcji poprzez petle"<