int main() { int a, b, c; printf("\n Vvedite 3 chisla : "); scanf("%d" "%d" "%d", &a, &b, &c);
if (a > b && a > c) printf("\n a = %d", a); if (b > c && b > a) printf("\n b = %d", b); if (c > b && c > a) printf("\n c = %d", c); if (a == b && a > c) printf("\n a = %d b = %d", a, b); if (a == c && a > b) printf("\n a = %d c = %d", a, c); if (b == c && b > c) printf("\n b = %d c = %d", b, c); if (a == b && a == c) printf("\n a = %d b = %d c = %d", a, b, c);
printf("\n\n press klavishy... "); getch( );
return 0; }
Паскаль (Откомпилирован и проверен был в Pascal ABC)
program z1; uses crt; var a, b , c: integer;
begin
write('Vvedite 3 chisla: '); readln(a, b, c);
if (a > b) and (a > c) then writeln(' a = ', a); if (b > c) and (b > a) then writeln(' b = ', b); if (c > a) and (c > b) then writeln(' c = ', c); if (a = b) and (a > c) then writeln(' a = ', a, ' b = ', b); if (a = c) and (a > b) then writeln(' a = ', a, ' c = ', c); if (b = c) and (b > c) then writeln(' b = ', c, ' c = ', c); if (a = b) and (a = c) then writeln(' a = ', a, ' b = ', b, ' c = ', c);
Язык СИ (Откомпилирован и проверен был в Dev-C++)
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
int a, b, c;
printf("\n Vvedite 3 chisla : ");
scanf("%d" "%d" "%d", &a, &b, &c);
if (a > b && a > c) printf("\n a = %d", a);
if (b > c && b > a) printf("\n b = %d", b);
if (c > b && c > a) printf("\n c = %d", c);
if (a == b && a > c) printf("\n a = %d b = %d", a, b);
if (a == c && a > b) printf("\n a = %d c = %d", a, c);
if (b == c && b > c) printf("\n b = %d c = %d", b, c);
if (a == b && a == c) printf("\n a = %d b = %d c = %d", a, b, c);
printf("\n\n press klavishy... ");
getch( );
return 0;
}
Паскаль (Откомпилирован и проверен был в Pascal ABC)
program z1;
uses crt;
var a, b , c: integer;
begin
write('Vvedite 3 chisla: ');
readln(a, b, c);
if (a > b) and (a > c) then writeln(' a = ', a);
if (b > c) and (b > a) then writeln(' b = ', b);
if (c > a) and (c > b) then writeln(' c = ', c);
if (a = b) and (a > c) then writeln(' a = ', a, ' b = ', b);
if (a = c) and (a > b) then writeln(' a = ', a, ' c = ', c);
if (b = c) and (b > c) then writeln(' b = ', c, ' c = ', c);
if (a = b) and (a = c) then writeln(' a = ', a, ' b = ', b, ' c = ', c);
end.