We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03cb215 commit eba128dCopy full SHA for eba128d
01.BaseProgrammer.c
@@ -1,20 +1,21 @@
1
-/// It took a long time to come up with this solution.
2
-/// You made several mistakes at the beginning. But now,
3
-/// you are proud of your code.
+/// Though you knew how prime number worked, it took a long time
+/// to come up with this logic. Also, You made several mistakes
+/// on the way. And now, you are proud of your brilliant solution.
4
5
-int func (int a)
6
-{
+int func(int a)
+{
7
int x,i,r;
8
- x=0;
9
- i=0;
10
- for (i=1; i<=a; i=i+1)
11
- {
12
- if (a%i==0)
13
- x=x+1;
+ x = 0 ;
+ i = 0 ;
+ for(i=1; i<=a ; i=i+1 )
+ {
+ if (a%i == 0)
+ {x=x+1 ;}
14
}
15
- if (x==2)
16
- r=1;
+ if( x == 2)
+ {r = 1;}
17
else
18
- r=0;
19
- return r;
+ {r = 0;}
+ return r ;
20
+
21
0 commit comments