eolymp
bolt
Try our new interface for solving problems
Problems

The ratio of product to the sum

published at 4/24/13, 8:51:08 pm

який повинен бути результат у випадку введення 0 ? в такому випадку виникає помилка ділення на 0

published at 12/6/13, 6:03:14 pm

> semenoh > > який повинен бути результат у випадку введення 0 ? > в такому випадку виникає помилка ділення на 0
0 - не натуральное число

published at 3/22/18, 11:59:26 pm

Нехай прибуде з вами тип double замість float -_-

published at 1/30/20, 1:33:22 pm

meseleni elemek lazim deyil yuxaridan kocurun

published at 1/30/20, 1:35:12 pm

ne ise kocurun

published at 1/30/20, 1:35:35 pm

ne gozduyursen kocur

published at 4/11/24, 10:36:14 pm

include <iostream>

include <cmath>

include <algorithm>

include <string>

include <vector>

include <set>

define ll long long

define db double

define ch char

define st string

define bl bool

using namespace std; int main() { long long n,copy,son1,son2; db cem=0,hasil=1; double x; cin>>n; n=abs(n); copy=n; while(n!=0) { son1=n%10; cem+=son1; n/=10; } while(copy!=0) { son2=copy%10; hasil*=son2; copy/=10; } cout.precision(3); x=hasil/cem; cout<<fixed<<x; }