This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var numbers = window.prompt().split(' ').map(function(x){ | |
return parseInt(x); | |
}); | |
if ((numbers[0] + numbers[1] < numbers[2]) || (numbers[0] + numbers[2] < numbers[1]) || (numbers[1] + numbers[2] < numbers[0])) { | |
alert("N"); | |
} else { | |
alert("S"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numbers = [int(x) for x in input().split(' ')] | |
if ((numbers[0] + numbers[1] < numbers[2]) | (numbers[0] + numbers[2] < numbers[1]) | (numbers[1] + numbers[2] < numbers[0])): | |
print("N") | |
else: | |
print("S") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
class MainClass { | |
public static void Main (string[] args) { | |
var numbers = Console.ReadLine() | |
.Split(' ') | |
.Select(str => Convert.ToInt32(str)) | |
.ToArray(); | |
if ((numbers[0] + numbers[1] < numbers[2]) || (numbers[0] + numbers[2] < numbers[1]) || (numbers[1] + numbers[2] < numbers[0])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Caça fantasmas</title> | |
</head> | |
<body> | |
<div id="palco"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Código omitido --> | |
<style> | |
#palco { | |
/* Nosso palco ocupará 80% da largura e 80% da altura da tela. */ | |
width: 80%; | |
height: 80vh; | |
/* Define a imagem a ser utilizada como pano de fundo. */ | |
background-image: url('floresta.png'); | |
/* A imagem deve cobrir a div inteira, tanto em altura como em largura. */ | |
background-size: cover; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Código omitido --> | |
<div id="palco"> | |
<img src="fantasma1.svg" alt="Fantasma número 1" id="fantasma1"> | |
</div> | |
<!-- Código omitido --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/** | |
* Pega a imagem com id fantasma1 e salva em uma variável | |
* para que seja possível manipularmos com JavaScript. | |
*/ | |
const $fantasma1 = document.getElementById("fantasma1"); | |
// Esconde a imagem fantasma1. | |
function esconda() { | |
$fantasma1.style.display = "none"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Caça fantasmas</title> | |
<style> | |
#palco { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#fantasma1 { | |
position: relative; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Constante referente ao palco | |
const $palco = document.getElementById('palco'); | |
// https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Math/random | |
function getRandomInt(min, max) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min)) + min; | |
} |
OlderNewer