Skip to content

Commit 6a4db8a

Browse files
Update prac 1 fibo, prime, vowel, rev no, sum, for each
1 parent 361a7bd commit 6a4db8a

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

prac 1 fibo, prime, vowel, rev no, sum, for each

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,37 @@ using System.Collections.Generic;
44

55
using System.Linq;
66

7-
using System.Text; Class Op
8-
7+
using System.Text;
8+
Class Op
9+
{
910
int a = 0 b = 1 c, flimit, fcount=0;
1011

1112
int pnum;
1213

1314
public void finput()
14-
15+
{
1516
Console.WriteLine("Enter limit of fibonacci series: "); flimit int.Parse(Console.ReadLine());
1617

1718
public void fop()
1819

1920
{
2021

2122
if (flimit <= 0 )
22-
23+
{
2324
Console.WriteLine("Fibonacci series: ");
2425

25-
Console.WriteLine("Limit cannot be zero or negative"); }
26+
Console.WriteLine("Limit cannot be zero or negative");
27+
}
2628

2729
else
2830

2931
{ Console.WriteLine("Fibonacci series: "); while (flimit > fcount)
3032

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+
}}}
3438

3539
} } public void pinput() }
3640

@@ -70,4 +74,4 @@ if (pnum % i == 0)
7074

7175
public bool vop()
7276

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++)

0 commit comments

Comments
 (0)