Advertisement
STANAANDREY

pb33

Nov 17th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8.  int x,y,aux=1;
  9.  float nr;
  10.  cout<<"x=";cin>>x;
  11.  cout<<"y=";cin>>y;
  12.  int cy=y;
  13.  while (y!=0)
  14.  {
  15.     aux*=10;
  16.      y/=10;
  17.  }
  18. nr=(float)cy/(float)aux;
  19. nr+=x;
  20. cout<<"nr="<<nr;
  21. // */
  22.  
  23. return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement