program 1;
uses crt;
var a,b: real;
begin clrscr;
write('vvedite a '); readln(a);
write('vvedite b '); readln(b);
if a> b then begin a: =abs(2*a*b); b: =abs((a+b)/2); end else begin a: =abs((a+b)/2); b: =abs(2*a*b); end; writeln('a= ',a: 0: 2,' ','b= ',b: 0: 2); repeat until keypressed; end.
Объяснение:
No or not?
Grammar > Easily confused words > No or not?
из English Grammar Today
No and not are the two most common words we use to indicate negation. We use no before a noun phrase:
There’s no address on the envelope.
[parent to child]
No biscuits before dinner!
No decisions have been made.
We use not with any other phrase or clause:
It’s not often that you stop and think about the way you breathe.
Not suitable for children under 15.
Not surprisingly, it was a tense match but eventually the more experienced Australians won.
A:
Do you go cycling all year round?
B:
Not in the winter.
Поделитесь своими знаниями, ответьте на вопрос:
ну а вдруг числа отрицатильные)) а abs делает их положительными)
var a,b: real; begin cls;
write('vvedite a '); readln(a); write('vvedite b '); readln(b);
if a> b thenbegina: =2*a*b; b: =(a+b)/2; endelse begin a: =(a+b)/2; b: =2*a*b; end; writeln('a= ',a: 0: 2,' ','b= ',b: 0: 2); end.