inicio
int n;
double prom = 0.0;
int total = 0;
int suma = 0;
int suma1 = 0;
do
print"INTRODUCE VALOR NUEMRICO"
Read n
suma = suma + n
total = total + 1
}
while n != 9999
{
prom = (suma) / (total);
}
print "ELPROMEDIO RESULTANTE ES" , prom
}
fin
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYvPFz13ekQQeGECBxlfmv5LPIJ-DPVYDes6dBC5wFjH_Wv7A_Vz3NKOF-Y6nbO5ThVB3BUIeTwrNbSNSgrXsUk6nKFHi5py65jFbWdF6BFVv9EgzFA2ASlTaW_JcvdAxe44Qi4L_ouNZ8/s320/101..bmp)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int n;
double prom = 0.0;
int total = 0;
int suma = 0;
int suma1 = 0;
do
{
Console.WriteLine("INTRODUCE VALOR NUEMRICO");
n = int.Parse(Console.ReadLine());
suma = suma + n;
total = total + 1;
}
while (n != 9999);
{
prom = (suma) / (total);
}
Console.WriteLine("ELPROMEDIO RESULTANTE ES : {0}", prom);
Console.ReadKey();
}
}
}
No hay comentarios:
Publicar un comentario