7.2.. Za učitane a i b izračunati z prema formuli:
Opis rješenja:
Listing programa:
package zadatak;
import java.util.Scanner;
public class P07211072 {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
P07211072;
USES
WinCrt;
VAR
a,b,min,max1,z:real;
BEGIN
WRITE('Ukucajte brojeve a i b: ');
READLN(a,b);
min=a;
IF a>b THEN
min=b;
max1=SQR(a);
IF SQR(a)< SQR(b) THEN
max1=SQR(b);
IF a>=b THEN
z=1-min
ELSE
z= max1;
WRITELN('z = ',z);
END.
Ispis na ekranu:
Index
|
|