kananasgarli90

Kvadrat kök

Oct 17th, 2020
547
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cin>>n;
  9.     int a = n/100;
  10.     int b = n/10%10;
  11.     int c = n%10;
  12.     cout.precision(3);
  13.     cout<<fixed<<sqrt(a+b+c)<<endl;
  14. }
  15.  
RAW Paste Data