Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ScriptAlgoritmo
- {
- class Program
- {
- static void Main(string[] args)
- {
- /* Elabore um algoritmo que calcule a área e o perímetro de um quadrado.
- Área = lado2
- Perímetro = é a soma de todos os lados*/
- Console.Write("Digite o tamanho do lado do quadrado: ");
- int lado = int.Parse(Console.ReadLine ());
- int area = lado * lado;
- int perim = lado * 4;
- Console.WriteLine ("Área = " + area + " Perímetro = " + perim);
- }
- }
- }
Add Comment
Please, Sign In to add comment