All pastes #27418 Raw Edit

Mine

public text v1 · immutable
#27418 ·published 2005-11-02 17:02 UTC
rendered paste body
#include <iostream>
#include <conio.h>
using namespace std;
double Sqrt();

int main(int argc, char *argv[])
{
  Sqrt(); 
  getch();
  return 1;
}

double Sqrt() {
  double posaknis;
  double x=0;
  double y=0;
  double puse_posaknio;
  cout << "Iveskite posakni: ";
  cin >> posaknis;
  
  puse_posaknio = posaknis / 2;
  
  for(int i=0; i<puse_posaknio; i++) {
    x++;
    y = x * x;

    if(y == posaknis) {
      cout << x;
    }
  }
}