Hola como estas espero que te sirva !!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication15
{
class Program
{
static void Main(string[] args)
{
int s = 0;
Console.WriteLine("\t \t \t \t Multiplos de 5 del 5-100");
for (int i = 1; i < 101; i++)
{
if (i % 5 == 0)
{
Console.Write(" " + i);
s = s + i;
}
}
Console.WriteLine("\n Suma " + s);
Console.ReadKey();
}
}
}
Comentarios
Publicar un comentario