Ejemplo: programa c para encontrar el promedio de 3 números
#include <stdio.h>
int main(void)
{
// these numbers can be whatever you want
int number = 1231231;
int number2 = 1231232;
int number3 = 1;
// add up all the numbers you want to average, then divide it by the total amount of numbers. In this case there are 3 numbers, so you divide it by three.
int average = number + number2 + number3 / 3;
// prints the average
printf("%i", average);
}
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)