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
package com.java.io; | |
import java.io.File; | |
/** | |
* Classe para manipulacao de arquivos em Java. | |
* | |
* - ler/escrever/mover/renomear arquivos | |
* - criar/apagar/mover/renomear diretórios | |
* - listar diretorios |
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
/** | |
* Author : Samuel T. C. Santos | |
* version : 10.11.2014 | |
* | |
* Javascript e NodeJS nao tem o proposito de ler dados da entrada | |
* em linha de comando, por isso, vamos apenas declarar | |
* as variaveis e inicializar-las com um valor. | |
*/ | |
var metros = 0.88, |
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
package alp; | |
import java.util.Scanner; | |
/** | |
* Escreva um algoritmo que, para uma conta bancária, leia o seu número, | |
* o saldo, o tipo de operação a ser realizada (depósito ou retirada) | |
* e o valor da operação. Após, determine e mostre o novo saldo. | |
* | |
* Se o novo saldo ficar negativo, deve ser mostrada, também, a mensagem “conta estourada”. |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
var numero int | |
fmt.Print("Digite um número inteiro: ") | |
fmt.Scan(&numero) |
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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func main() { | |
var numero float64 | |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
var salario, aumento, percentual float32 | |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
var numero float32 | |
fmt.Print("Digite um numero: ") |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
var numero1 int | |
var numero2 int | |
fmt.Print("Digite o primeiro número: ") |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
var numero1, numero2, numero3 int | |
fmt.Print("Digite número 1: ") |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
var preco1, preco2, preco3, menorPreco float32 | |
fmt.Print("Preço do produto 1: ") |