Advertisement
icatalin

xyz neterminat

Jan 23rd, 2014
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. ifstream f("date.in");
  8. ofstream g("date.out");
  9.  
  10. int main()
  11. {
  12.     int x,y,z,nr=1,i,nr2,c=0,xyz=0;
  13.     f>>x>>y>>z;
  14.  
  15.  
  16.     for (i=1;i<=x-1;i++)
  17.     {
  18.         nr=nr*10;
  19.     }
  20.  
  21.  
  22.  
  23. i=1;
  24.     do
  25.     {
  26.         y=y*10;
  27.         i++;
  28.     }
  29. while (i<x);
  30.  
  31.  
  32. i=1;
  33.  
  34. do
  35. {
  36.     z=z*10;
  37.     i++;
  38. }
  39. while (i<x-1);
  40.  
  41.  
  42. xyz=y+z;
  43. g<<xyz;
  44.  
  45.  
  46.     return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement