Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Vishruth-S/CompetitiveCode
/ fun
Function
fun
CodeChef_problems/POTATOES/Solution.cpp:8–17 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
6
#include <iostream>
7
using namespace std;
8
int fun(int f)
9
{
10
for(int j=2;j*j<=(f);j++) //this contains the Main Logic ; j is traversed till sqrt of f
11
{ if(f%j==0)
12
{
13
return 0;
14
}
15
}
16
return 1;
17
}
18
19
int main()
20
{
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected