well i have a userinput for an integer. And i have to get sqrt of that number and find the closes number from array... and i dont rly know how to do that... can anyone help?
heres the part for my input:
Code:
int poljubnostevilo; cin >> poljubnostevilo; cout <<endl; int koren = sqrt (poljubnostevilo); cout << koren << endl;
Code:
int funkcijatri(int x, int n){
n = 4;
int praarray[x];
int a=0;
int sum;
while(a<x){
n++;
if(IsPrime(n) && (n>=a)){
praarray[a] = n;
cout << praarray[a] << ", ";
sum+= praarray[a];
a++;
}//konec if
}//konec while
return sum/x;
}






