Advertisement
AnandaVieira

Exercicio 39

May 7th, 2021
643
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ScriptCSharp
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             /* Exercício 39
  11.             Efetuar a leitura de um número e apresentar o resultado do quadrado desse número.
  12.             Depois verificar se este novo valor é maior que 10.00, menor que 10.00 ou igual a
  13.             10.00.
  14.             18
  15.             Se for maior que 10.00 apresentar também sua Raiz Cúbica. */
  16.  
  17.             Console.Write("Digite um número: ");
  18.             double num = double.Parse(Console.ReadLine());
  19.  
  20.             Console.WriteLine(Math.Sqrt(num));
  21.  
  22.             if (num > 10)
  23.             {
  24.                 Console.WriteLine(Math.Cbrt(num));
  25.             }
  26.  
  27.         }
  28.     }
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement