#include <iostream>
#include <iomanip>
using namespace std;
void main()
{
float arr[5];
cout << "Please, enter 5 numbers: ";
for (int i = 0; i < 5; i++)
{
cin >> arr[i];
}
float sum = 0;
cout << fixed << setprecision(1);
for (int i = 0; i < 5; i++)
{
cout<<arr[i]<<" ";
if (i != 4)
sum += arr[i];
}
cout << endl;
if (sum > arr[4])
cout << "Yes";
}
Comments
Leave a comment