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.Text; | |
namespace ConsoleApp4 | |
{ | |
class Aula14_08_2019 | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Informe um valor"); |
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
#include <iostream> | |
#include <locale> | |
// Até 5 Kg | |
// Morango R$4,50 por Kg | |
// Maça R$2,80 por Kg. | |
// Acima de 5 Kg | |
// Morango R$3,20 por Kg | |
// Maça R$1,80 por Kg. |
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
#include <iostream> | |
#include <locale> | |
//Um posto está vendendo combustíveis com a seguinte tabela de descontos: | |
// * até 20 litros, desconto de 3% por litro de Álcool | |
// * acima de 20 litros, desconto de 5% por litro de Álcool | |
// * até 20 litros, desconto de 4% por litro de Gasolina | |
// * Gasolina acima de 20 litros, desconto de 6% por litro | |
//Escreva um algoritimo que leia o número de litros vendidos e o tipo de | |
//combustível (codificado da seguinte forma: A-álcool, G-gasolina), calcule |
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
~~ Adicionar esse código dentro do Main | |
// Cria uma lista vazia de alunos utilizando a classe ArrayList | |
List<Aluno> listaAlunos = new ArrayList<Aluno>(); | |
// Cria um objeto da classe Scanner para ler entrada do usuário | |
Scanner scanner = new Scanner(System.in); | |
// Pede ao usuário que informe quantos alunos ele deseja adicionar nota | |
System.out.println("Quantos alunos você vai adicionar nota? "); |