Guest User

Untitled

a guest
Jul 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. // itransition.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <math.h>
  6.  
  7. int main()
  8. {
  9.     FILE *file;
  10.     file = fopen("file.txt","wt+");
  11.     for (int i=0; i<100000000; i++)
  12.     {
  13.         int x = sqrt((float)i);
  14.         if ( x*x == i)
  15.         {
  16.             fprintf(file,"%d\n",i);
  17.         }
  18.     }
  19.     fclose(file);
  20.     return 0;
  21. }
Add Comment
Please, Sign In to add comment