prom

Zaid · November 18, 2020 · C++
#include <stdio.h>
#include <math.h>
using namespace std;
	int n1, n2, n3, n4, n5;
	float promedio=0;
int main(int argc, char *argv[])
{
	scanf( "%d", &n1 );
	scanf( "%d", &n2 );
	scanf( "%d", &n3 );
	scanf( "%d", &n4 );
	scanf( "%d", &n5 );
	
	promedio = (n1+n2+n3+n4+n5)/5;
	printf("%.2f", promedio );
	
	return 0;
}

Comments

Please sign up or log in to contribute to the discussion.