#include <stdio.h>
int main()
{
float a, b, c;
scanf("%f%f%f", &a, &b, &c);
if (a >= 0 && b >= 0 && c >= 0){
if (a < b && a < c)
printf("MIN: %f", a);
else if (b < a && b < c)
printf("MIN: %f", b);
else
printf("MIN: %f", c);
}
else{
a /= 2;
b /= 2;
c /= 2;
printf("%f, %f, %f", a, b, c);
return 0;
Ответ:
int a = 3;
int b = -3;
int c = 6;
var count = 0;
if(a > 0) count++;
if(b > 0) count++;
if(c > 0) count++;
if(count >= 2)
if(a % 2 != 0) a--;
if(b % 2 != 0) b--;
if(c % 2 != 0) c--;
Console.WriteLine($"a = {a}; b = {b}; c = {c}");
var sum = a + b + c;
Console.WriteLine($"sum = {sum}");
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <stdio.h>
int main()
{
float a, b, c;
scanf("%f%f%f", &a, &b, &c);
if (a >= 0 && b >= 0 && c >= 0){
if (a < b && a < c)
printf("MIN: %f", a);
else if (b < a && b < c)
printf("MIN: %f", b);
else
printf("MIN: %f", c);
}
else{
a /= 2;
b /= 2;
c /= 2;
printf("%f, %f, %f", a, b, c);
}
return 0;
}
Ответ:
int a = 3;
int b = -3;
int c = 6;
var count = 0;
if(a > 0) count++;
if(b > 0) count++;
if(c > 0) count++;
if(count >= 2)
{
if(a % 2 != 0) a--;
if(b % 2 != 0) b--;
if(c % 2 != 0) c--;
Console.WriteLine($"a = {a}; b = {b}; c = {c}");
}
else
{
var sum = a + b + c;
Console.WriteLine($"sum = {sum}");
}
Объяснение: