AnandaVieira

Exercício01

Apr 14th, 2021
611
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace ScriptCSharp
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.         /* Exercício 01 - Calcular e apresentar o valor do volume de uma lata de óleo, utilizando a
  11.         fórmula: Volume = pi * raio2 * Altura.*/
  12.  
  13.         Console.WriteLine("Exercício 1 - Ananda de Amorim Vieira RA: 2112495");
  14.  
  15.         Console.WriteLine("Digite o raio da lata de óleo: ");
  16.         double raio = double.Parse (Console.ReadLine());
  17.        
  18.         Console.WriteLine("Digite a altura da lata de óleo: ");
  19.         double alt = double.Parse (Console.ReadLine());
  20.  
  21.         double volume = Math.PI * Math.Pow(raio,2) * alt ;
  22.         Console.WriteLine("O volume da lata de óleo é de: "+ volume.ToString("f2"));
  23.  
  24.         }
  25.     }
  26. }
  27.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×