Skip to content

Commit 361a7bd

Browse files
Update
1 parent d6f5ea7 commit 361a7bd

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
Title: Fibonacci Series, Prime No, Vowels, Reverse Number & Sum, For Each Loop using System;
2+
3+
using System.Collections.Generic;
4+
5+
using System.Linq;
6+
7+
using System.Text; Class Op
8+
9+
int a = 0 b = 1 c, flimit, fcount=0;
10+
11+
int pnum;
12+
13+
public void finput()
14+
15+
Console.WriteLine("Enter limit of fibonacci series: "); flimit int.Parse(Console.ReadLine());
16+
17+
public void fop()
18+
19+
{
20+
21+
if (flimit <= 0 )
22+
23+
Console.WriteLine("Fibonacci series: ");
24+
25+
Console.WriteLine("Limit cannot be zero or negative"); }
26+
27+
else
28+
29+
{ Console.WriteLine("Fibonacci series: "); while (flimit > fcount)
30+
31+
{ Console.Write(a + ""); c = a + b fcount++;
32+
33+
a = b b = c
34+
35+
} } public void pinput() }
36+
37+
{
38+
39+
pnum Console.WriteLine("\nEnter number: "); int.Parse(Console.ReadLine()); }
40+
41+
public bool pop()
42+
43+
{
44+
45+
if (pnum <= 1 )
46+
47+
{ return false;
48+
49+
}
50+
51+
else
52+
53+
{
54+
55+
for (int i = 2 i < pnum; i++)
56+
57+
{
58+
59+
if (pnum % i == 0)
60+
61+
{ return false;
62+
63+
}
64+
65+
} return true;
66+
67+
}
68+
69+
} char[] ca = { 'a', 'e', 'i', 'o', 'u' };
70+
71+
public bool vop()
72+
73+
{ Console.WriteLine("\nEnter a character: "); char c * 1 = Convert.ToChar(Console.ReadLine()); for (int i = theta i < 5 1++)

0 commit comments

Comments
 (0)