<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Resultado Conversor</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
    integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<% ArrayList<Float>resultado=(ArrayList<Float>) request.getAttribute("resultado");


String tipo =request.getAttribute("P0").toString();
if(tipo.toLowerCase().equals("c")){
	tipo="° Celsius";
}else if(tipo.toLowerCase().equals("f")){
	tipo="° Fahrenheit";
}else{
	tipo="° Kelvin";
}
%>

</body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <a class="navbar-brand" href="#">Menu</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
      aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item active">
          <a class="nav-link" href="/jweb-e002/index.html">Inicio <span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item active">
          <a class="nav-link" href="/jweb-e002/conversor.html">Conversor <span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item active">
          <a class="nav-link" href="/jweb-e002/agenda.html">Agenda<span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item active">
          <a class="nav-link" href="/jweb-e002/cartas.html">Cartas de Poker<span class="sr-only">(current)</span></a>
        </li>
    </div>

  </nav>

<div class="container">
    
      <br>
      <div class="form-group row">
    <label for="staticEmail" class="col-sm-2 col-form-label">De Tipo Temperatura</label>
    <div class="col-sm-10">
      <input type="text" readonly class="form-control-plaintext" id="tipo" value="<%=tipo%>">
    </div>
  </div>

      <div class="form-group">
        <label for="tarea">Temperatura</label>
        <input type="number" class="form-control" id="P1" name="P1" placeholder="Temperatura en digitos" value="<%=request.getAttribute("P1").toString() %>" required disabled>
      </div>
	
	 <div class="form-group row">
    <label for="staticEmail" class="col-sm-2 col-form-label"> a Celsius</label>
    <div class="col-sm-10">
      <input type="text" readonly class="form-control-plaintext" id="tipo" value="<%=resultado.get(0).toString()+" °C" %>">
    </div>
  </div>
       <div class="form-group row">
    <label for="staticEmail" class="col-sm-2 col-form-label">a Fahrenheit</label>
    <div class="col-sm-10">
      <input type="text" readonly class="form-control-plaintext" id="tipo" value="<%=resultado.get(1).toString()+" °F" %>">
    </div>
  </div>
   <div class="form-group row">
    <label for="staticEmail" class="col-sm-2 col-form-label"> a Kelvin</label>
    <div class="col-sm-10">
      <input type="text" readonly class="form-control-plaintext" id="tipo" value="<%=resultado.get(2).toString()+" °K" %>">
    </div>
  </div>

</html>