7.2.. Za učitane a i b izračunati z prema formuli:

Opis programa: Prvo treba naći minimum brojeva a i b ( min := a; IF a>b THEN min := b;), pa minimum kvadrata brojeva a i b ( min2 := SQR(a); IF SQR(b) < min2 THEN min2 := SQR(b);) te izračunati z.

Listing programa:

/07211051//
#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    double a,b,min,min2,z;

    cout << "Unesite dva broja: " << endl;
    cin>>a>>b;

    min=a;
    min2=b;
    if (a > b)

        min=b;
    min2=(b*b);
    if ((a*a) < min2)
        min2=(b*b);
    else
        z=min / (min2 + 6);
    cout << "a= " << a << " " << "b= " << b << " " << "min= " << min << " " << "min2= " << min2 << " " << "z= " << z << endl;

    return 0;
}

Ispis na ekranu:

Index