#include <iostream>
using namespace std;
int main()
{
int mult = 1;
for(int i = -6; i <= 5; i++)
if(i != 0)
mult *= i;
cout << mult;
return 0;
}
float num;
int counter = 0;
float sum = 0;
while(cin >> num)
sum += num;
counter++;
cout << sum / counter;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main()
{
int mult = 1;
for(int i = -6; i <= 5; i++)
if(i != 0)
mult *= i;
cout << mult;
return 0;
}
////////////////////////
#include <iostream>
using namespace std;
int main()
{
float num;
int counter = 0;
float sum = 0;
while(cin >> num)
{
sum += num;
counter++;
}
cout << sum / counter;
return 0;
}