Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- float m = 0;
- Console.WriteLine("Insira 5 números: ");
- for (int i = 0; i < 5; i++)
- {
- int n;
- int.TryParse(Console.ReadLine(), out n);
- m += n;
- }
- m /= 5;
- Console.WriteLine("A Média dos 5 números é: " + m);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement