SIN C++


SUBMITTED BY: Guest

DATE: Nov. 23, 2013, 4:54 p.m.

FORMAT: Text only

SIZE: 218 Bytes

HITS: 693

  1. http://cur.lv/4x9e0 (Earn Bitcoins)
  2. #include <iostream>
  3. using namespace std;
  4. int main () {
  5. int n;
  6. cin>>n;
  7. if (n%2==0) cout<<(n/2)*9;
  8. else cout<< ((n-1)/2)*9+5;
  9. return 0;}

comments powered by Disqus