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).*/
- Console.WriteLine("Esfera");
- Console.Write("Entre com o valor do raio: ");
- double raio = double.Parse(Console.ReadLine());
- double vol = (4/3 * 3.14) * raio * raio * raio;
- double area = (4 * 3.14) * raio * raio;
- Console.WriteLine("O valor do volume é: "+ vol);
- Console.WriteLine("A área da esfera é de: "+ area);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement