Advertisement
icatalin

nreal

Nov 5th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. double nreal(int x,int y)
  7. {
  8.     double nd;
  9.     nd=y;
  10.     while (y)
  11.     {
  12.         y/=10;
  13.         nd/=10;
  14.     }
  15.     nd+=x;
  16.     return nd;
  17. }
  18.  
  19. int main()
  20. {
  21.     int x,y;
  22.     cin>>x>>y;
  23.     cout<<nreal(x,y);
  24.  return 0;
  25. }
  26.  
  27. //SE TRIMIE DOAR nreal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement