Yash Awp1d
Yash Awp1d
CODE :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace practical1d
class Prcatical1d
int n0 = 0;
int n1 = 1;
Console.WriteLine(n0);
Console.WriteLine(n1);
for(int i=3;i<=n;i++)
{
int n3 = n0 + n1;
Console.WriteLine(n3);
n0 = n1;
n1 = n3;
if (num % i == 0)
revalue=false;
break;
return revalue;
if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U')
revalue = true;
}
return revalue;
Console.WriteLine(ch);
int m;
int sum = 0;
int rev = 0;
m = num % 10;
sum += m;
rev = rev * 10 + m;
class Program
{
switch(choice)
case 1:
int n = int.Parse(Console.ReadLine());
p1.Generate_Fibonacci_Series(n);
break;
case 2:
int num;
num = int.Parse(Console.ReadLine());
bool ans=p1.isPrime(num);
if (ans == true)
else
break;
case 3:
if (ans1 == true)
else
break;
case 4:
p1.Foreach_operation(myArray);
break;
case 5:
int a = Convert.ToInt32(Console.ReadLine());
p1.reverse_Num(a);
break;
default:
Console.WriteLine("Wrong Entry");
break;
Console.ReadLine();
}
OUTPUT
i)Fibonacci series.
ii)prime numbers.
iii)vowels.
iv. Use of for each loop with arrays.
5)Reverse a number and find sum of digits of a number Enter the Operation Number you
want to perform