TOPIC

Dart - Wrong answer (100%)

joaojunior7 asked 1 year ago

Eu não tenho a minima ideia, de qual é o meu erro....

import 'dart:io';

void main() { final valorEntrada = stdin.readLineSync();

final List<String> ValoresSeparados = valorEntrada.split(" ");

int A = int.tryParse(ValoresSeparados[0]);
int B = int.tryParse(ValoresSeparados[1]);
int C = int.tryParse(ValoresSeparados[2]);

final MaiorAB = A + B+ (A-B).abs();
final teste = MaiorAB /2;
final MaiorABC = teste + C + (teste -C).abs();
final resultado = MaiorABC  /2;

print('$resultado eh o maior');

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.