Advertisement
Farjana_akter

Untitled

Aug 14th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. //https://www.algorithmist.com/index.php/UVa_138
  4. int main()
  5. {
  6. long long int i,j,k,a=6,b=8,c=35,d=49,e,f,g,cnt=3,pre,pre1,x,y;
  7. printf("%10lld%10lld\n%10lld%10lld\n",a,b,c,d);
  8. pre1=6;
  9. pre=35;
  10. e=pre*6-pre1;
  11. while(cnt<=10)
  12. {
  13. x=pre*6-pre1;;
  14. y=(long long int)sqrt(x*x*2);
  15. printf("%10lld%10lld\n",x,y);
  16. pre1=pre;
  17. pre=x;
  18. cnt++;
  19. }
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement