Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int obwod (int a, int b, int c)
- {
- int suma;
- suma = a + b + c;
- return suma;
- }
- int main()
- {
- int x,y,z;
- cout << "Podaj wartosc pierwszego boku:" <<endl;
- cin >> x;
- cout << "Podaj wartosc drugiego boku:" <<endl;
- cin >> y;
- cout << "Podaj wartosc trzeciego boku:" <<endl;
- cin >> z;
- if( x + y > z && x + z > y && z + y > x)
- {
- cout << "Mozna zubdowac trojkat" << endl;
- cout << obwod(x,y,z);
- }
- else
- {
- cout << "Nie mozna zbudowac trojkata" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment