#include <iostream>
using namespace std;
int main()
{
int n;
float a;
cin >> n;
int kp = 0, kn = 0;
for(int i = 1; i <= n; i++)
cin >> a;
if (a > 0) kp++;
else if(a < 0) kn++;
}
if (kn > kp) cout << "verno";
else cout << "neverno";
return 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main()
{
int n;
float a;
cin >> n;
int kp = 0, kn = 0;
for(int i = 1; i <= n; i++)
{
cin >> a;
if (a > 0) kp++;
else if(a < 0) kn++;
}
if (kn > kp) cout << "verno";
else cout << "neverno";
return 0;
}