Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ScriptCSharp
- {
- class Program
- {
- static void Main(string[] args)
- {
- /*24 - Elabore um algoritmo para calcular o volume e a área de uma esfera(figura
- meramente ilustrativa).
- Área = 4 * 3.14 * 𝑟2
- Volume = 4/3 * 3.14 * r3
- */
- Console.Write("Entre com o raio: ");
- double raio = double.Parse(Console.ReadLine());
- double area = 4 * 3.14 * (raio * raio);
- Console.WriteLine("Área: " + area);
- double vol = 4/3 * 3.14 * (raio * raio * raio);
- Console.WriteLine("Volume: " + vol);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement