Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 years ago
295 B
2
Indexable
Never

#include <iostream>
using namespace std;

int main()
{

	double n1, n2, n3, n4, n5, average;
	cout << "Average of 5 numbers\n";
	cout << "Enter 5 numbers: ";
	cin >> n1 >> n2 >> n3 >> n4 >> n5;
	average = (n1 + n2 + n3 + n4 + n5) / 5;

	cout << "Average is: " << average << endl;
	
	return 0;
}