File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -4,33 +4,37 @@ using System.Collections.Generic;
4
4
5
5
using System.Linq;
6
6
7
- using System.Text; Class Op
8
-
7
+ using System.Text;
8
+ Class Op
9
+ {
9
10
int a = 0 b = 1 c, flimit, fcount=0;
10
11
11
12
int pnum;
12
13
13
14
public void finput()
14
-
15
+ {
15
16
Console.WriteLine("Enter limit of fibonacci series: "); flimit int.Parse(Console.ReadLine());
16
17
17
18
public void fop()
18
19
19
20
{
20
21
21
22
if (flimit <= 0 )
22
-
23
+ {
23
24
Console.WriteLine("Fibonacci series: ");
24
25
25
- Console.WriteLine("Limit cannot be zero or negative"); }
26
+ Console.WriteLine("Limit cannot be zero or negative");
27
+ }
26
28
27
29
else
28
30
29
31
{ Console.WriteLine("Fibonacci series: "); while (flimit > fcount)
30
32
31
- { Console.Write(a + ""); c = a + b fcount++;
32
-
33
- a = b b = c
33
+ { Console.Write(a + ""); c = a + b;
34
+ a=b;
35
+ b=c;
36
+ fcount++;
37
+ }}}
34
38
35
39
} } public void pinput() }
36
40
@@ -70,4 +74,4 @@ if (pnum % i == 0)
70
74
71
75
public bool vop()
72
76
73
- { Console.WriteLine("\nEnter a character: "); char c * 1 = Convert.ToChar(Console.ReadLine()); for (int i = theta i < 5 1++)
77
+ { Console.WriteLine("\nEnter a character: "); char c * 1 = Convert.ToChar(Console.ReadLine()); for (int i = theta i < 5 1++)
You can’t perform that action at this time.
0 commit comments