Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

4

#include <iostream>

#include <cmath>

using namespace std;

int main()

int bok;

int obwod;

float przekatna, zprzek;

int pole;

cout << "podaj bok ";

cin>>bok;

obwod = 4 * bok;

pole = pow(bok,2);

przekatna = bok*sqrt(2);

cout<<przekatna<<endl;

cout<<" obwod "<<obwod<<" pole "<<" przekatna "<<zprzek;

return 0;

#include <iostream>
using namespace std;

int main()

int a, b, c, obwod;

cout << "podaj boki: ";

cin>>a>>b>>c;

if(a+b>c&&a+c>b&&b + c > a)

obwod = a + b + c;

cout<<"obwod= "<<obwod;

else cout<<"err";

return 0;

#include <iostream>

#include <cmath>

using namespace std;

int main()

{
int a, b,sum, roznica, il, reszta, dzc, kw;

float dzr;

cout<<"podaj a ";

cin>>a;

cout << "podaj b ";

cin>>b;

sum = a + b;

roznica = a - b;

il = a * b;

reszta = a % b;

dzc = a / b;

dzr = 1.0 * a/b;

kw = a * a;

cout<<"suma = "<<sum<<endl<<"roznica = "<<roznica<<endl;

cout<<"iloczyn = "<<il<<endl<<"reszta = "<<reszta<<endl;

cout<<"dzc = "<<dzc<<endl<<"dzr = "<<dzr<<endl;

cout<<"kw = "<<kw;

#include <iostream>
#include <cmath>

using namespace std;

int main()

int a;

cout<<"a = ";

cin>>a;

a++;

cout<<"a="<<a<<endl;

a--;

cout<<"a="<<a;

#include <iostream>

using namespace std;

int main()

int a;

cout<<"wpisz liczbe ";

cin>>a;

if(a>0){

cout<<"a jest dodatnia";

}
else if (a==0){

cout<<"a rowna sie 0";

else cout<<"a jest ujemna";

#include <iostream>

using namespace std;

int main()

int a;

cout<<"wpisz liczbe ";

cin>>a;

if(a%2==0)

cout<<"a jest parzysta";

else cout<<"a jest nieparzysta";

You might also like