SlideShare uma empresa Scribd logo
1 de 16
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace neha
{
class MATRIX
{
static void Main(string[] str)
{
Console.WriteLine(" Program to calculate addition of two matrix of size
2*2 ");
int[,] m1 = new int[3, 3];
Console.WriteLine();
Console.WriteLine("Enter the Values of 1st matrix : ");
for (int i = 0; i < 2; i++)
{
for (int j = 0; j < 2; j++)
{
m1[i, j] = int.Parse(Console.ReadLine());
}
}
int[,] m2 = new int[3, 3];
Console.WriteLine("Enter the Values of 2nd matrix :");
for (int i = 0; i < 2; i++)
{
for (int j = 0; j < 2; j++)
{
m2[i, j] = int.Parse(Console.ReadLine());
}
}
int[,] c = new int[3, 3];
Console.WriteLine("The Addtion of Matrix is : ");
for (int i = 0; i < 2; i++)
{
for (int j = 0; j < 2; j++)
{
Console.Write((m1[i, j] + m2[i, j]) + " ");
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}
/***WAP to calculate addition of two 2*2 matrix***/
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
OUTPUT
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NEHA
{
class STRING
{
public static void length()
{
string s;
Console.WriteLine("Enter The String ");
s = Console.ReadLine();
Console.WriteLine("Lenght of the String is :" + s.Length);
}
public static void palindrome()
{
string str, revstr;
Console.WriteLine("Enter Any String to Know It is Palindrome or not");
str = Console.ReadLine();
char[] tempstr = str.ToCharArray();
Array.Reverse(tempstr);
revstr = new string(tempstr);
bool caseignore = str.Equals(revstr, StringComparison.OrdinalIgnoreCase);
if (caseignore == true)
{
Console.WriteLine("............" + str + " Is a
Palindrome..........");
}
else
{
Console.WriteLine("............" + str + " Is Not a
Palindrome........");
}
}
static void Main(string[] args)
{
length();
palindrome();
Console.ReadLine();
}
}
}
/*** create a class to perform following operations:-
 Calculate the length of string.
 Check whether the string is a palindrome or not. ***/
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
OUTPUT
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace neha
{
class EVENODD
{
static void Main(string[] str)
{
Console.WriteLine("Even" + " " + "ODD");
for (int i = 0; i < 50; i++)
{
if ((i % 2) == 0)
Console.Write(i + " ");
else
{
if ((i % 2) != 0)
Console.WriteLine(i);
}
}
Console.ReadLine();
}
}
}
/***WAP to generate series of even and odd numbers
separately between 1to50***/
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
OUTPUT
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace neha
{
class FACTORIAL
{
public static string rev(string st)
{
char[] ar = st.ToCharArray();
Array.Reverse(ar);
return new string(ar);
}
static int a, b = 1;
static string st;
static void Main(string[] str)
{
Console.Write(" Program to Calculate the Factorial, length, Reverse of
the string ");
Console.WriteLine();
Console.WriteLine();
Console.Write("Enter the any value:");
a = int.Parse(Console.ReadLine());
for (int i = a; i > 1; i--)
{
b = b * i;
}
Console.Write("Factorial number: ");
Console.WriteLine(b);
st = b.ToString();
st = rev(st);
Console.Write("Length of string: ");
Console.WriteLine(st.Length);
Console.Write("Reverse String: ");
Console.WriteLine(st);
Console.ReadKey();
}
}
}
/***WAP to find the factorial of given integer, inverse
of the number, calculate sum of the digits***/
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
OUTPUT
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
Define a class to represent a bank account having
following members name, acc. No, type, initial
values deposited amt, withdraw amt and display
balance.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Collections;
using System.Media;
using System.Resources;
using System.Reflection;
using System.Diagnostics;
using System.IO;
namespace timer_and_acount_prog
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Form2 frm = new Form2();
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox3.Text == "" ||
(!Regex.IsMatch(textBox1.Text, @"[0-9]") || !(Regex.IsMatch(textBox3.Text, @"[0-
9]"))))
{
MessageBox.Show("Please Enter the integer value in: " + 'n' +
'n' + " ACCOUNT NO. AND TOTAL AMOUNT", "MANI MESSAGE");
}
else if (textBox2.Text == "" || textBox4.Text == "" ||
(!Regex.IsMatch(textBox2.Text, @"[a-zA-Z]") || !(Regex.IsMatch(textBox4.Text,
@"[a-zA-Z]"))))
{
MessageBox.Show("Please Enter the String in: " +
Environment.NewLine+'n' + "NAME AND ACCOUNT TYPE", "MANI MESSAGE");
}
else
{
frm.a = int.Parse(textBox1.Text);
frm.b = int.Parse(textBox3.Text);
frm.d = button1.Text;
frm.Show();
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
this.Hide();
}
}
private void button3_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox3.Text == "" ||
(!Regex.IsMatch(textBox1.Text, @"[0-9]") || !(Regex.IsMatch(textBox3.Text, @"[0-
9]"))))
{
MessageBox.Show("Please Enter the integer value in: " + 'n' +
'n' + " ACCOUNT NO. AND TOTAL AMOUNT", "MANI MESSAGE");
}
else if (textBox2.Text == "" || textBox4.Text == "" ||
(!Regex.IsMatch(textBox2.Text, @"[a-zA-Z]") || !(Regex.IsMatch(textBox4.Text,
@"[a-zA-Z]"))))
{
MessageBox.Show("Please Enter the String in: "+
Environment.NewLine+'n' +"NAME AND ACCOUNT TYPE", "MANI MESSAGE");
}
else
{
frm.a = int.Parse(textBox1.Text);
frm.b = int.Parse(textBox3.Text);
frm.d = button3.Text;
frm.Show();
this.Hide();
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button4_Click(object sender, EventArgs e)
{
this.Close();
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("Account No.: " + textBox1.Text.ToString() +
'n' + 'n' + "Name Is: " + textBox2.Text + 'n' + 'n' + "Total
Amount: " + textBox3.Text.ToString() + 'n' + 'n' + label4.Text + ": " +
textBox4.Text, "MANI MESSAGE");
}
}
}
FORM 2
using System;
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace timer_and_acount_prog
{
public partial class Form2 : Form
{
public int a, b, c;
public string d,s;
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form1 f = new Form1();
if (textBox5.Text == "" || (!Regex.IsMatch(textBox5.Text,@"[0-9]")))
{
MessageBox.Show("Please Enter the integer value");
}
else
{
c = int.Parse(textBox5.Text);
if (label5.Text == "Deposit")
{
textBox2.Text = (b + c).ToString();
}
else
{
if (b > c)
{
textBox2.Text = (b - c).ToString();
}
else
MessageBox.Show("Your Amount Is More than total Amount
"+'n'+" Your Current Balance is: "+b);
}
MessageBox.Show("ACCOUNT NO. " + textBox1.Text + " " + "
Balance Is " + textBox2.Text, "KALRA BANK ;) :P");
}
}
private void Form2_Load(object sender, EventArgs e)
{
Form1 f = new Form1();
f.Hide();
textBox1.Text = a.ToString();
label5.Text = d;
label5.Visible = true;
textBox5.Visible = true;
textBox1.ReadOnly = true;
}
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
private void button2_Click(object sender, EventArgs e)
{
Form1 frm = new Form1();
this.Close();
frm.Show();
}
}
}
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
OUTPUT:-
C# Practical File 2013
By: Syed Mohd Naqi Zaidi
Swap two values using call by reference .
a) Create a method using reference parameter to calculate square of no.
b) Create a class by name decompose that separates the integer no and
fractional part of given floating point no.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Swap
{
class Swapping
{
class Swap
{
public void swap(ref int a, ref int b)
{
int t;
t = a;
a = b;
b = t;
}
static void squareRef(ref int refParameter)
{
refParameter *= refParameter;
}
public class SwapDemo
{
public static void Main()
{
Swap ob = new Swap();
int x = 10, y = 20;
Console.WriteLine("X and Y Before call: " + x + " " + y);
ob.swap(ref x, ref y);
Console.WriteLine("X and Y After call: " + x + " " + y);
int arg;
arg = 5;
squareRef(ref arg);
Console.WriteLine("Square Of a Number is :"+arg);
Console.Read();
}
}
}
}
}
C# Practical File 2013
By: Syed Mohd Naqi Zaidi

Mais conteúdo relacionado

Mais procurados

27. mathematical, date and time functions in VB Script
27. mathematical, date and time  functions in VB Script27. mathematical, date and time  functions in VB Script
27. mathematical, date and time functions in VB ScriptVARSHAKUMARI49
 
Oops practical file
Oops practical fileOops practical file
Oops practical fileAnkit Dixit
 
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERDarwin Durand
 
Sachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third YearSachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third YearDezyneecole
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILEAnushka Rai
 
C++ project on police station software
C++ project on police station softwareC++ project on police station software
C++ project on police station softwaredharmenderlodhi021
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2Mouna Guru
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THSHAJUS5
 
Declaring friend function with inline code
Declaring friend function with inline codeDeclaring friend function with inline code
Declaring friend function with inline codeRajeev Sharan
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd marchRajeev Sharan
 
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...Salar Delavar Qashqai
 
React London April- Fully functional: Central state is a great fit for React ...
React London April- Fully functional: Central state is a great fit for React ...React London April- Fully functional: Central state is a great fit for React ...
React London April- Fully functional: Central state is a great fit for React ...React London Community
 

Mais procurados (20)

27. mathematical, date and time functions in VB Script
27. mathematical, date and time  functions in VB Script27. mathematical, date and time  functions in VB Script
27. mathematical, date and time functions in VB Script
 
Oops practical file
Oops practical fileOops practical file
Oops practical file
 
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
 
Ditec esoft C# project
Ditec esoft C# project Ditec esoft C# project
Ditec esoft C# project
 
Ditec esoft C# project
Ditec esoft C# projectDitec esoft C# project
Ditec esoft C# project
 
Sachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third YearSachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third Year
 
C++ TUTORIAL 4
C++ TUTORIAL 4C++ TUTORIAL 4
C++ TUTORIAL 4
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
 
C++ project on police station software
C++ project on police station softwareC++ project on police station software
C++ project on police station software
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
 
Declaring friend function with inline code
Declaring friend function with inline codeDeclaring friend function with inline code
Declaring friend function with inline code
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
 
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
 
Pemrograman visual
Pemrograman visualPemrograman visual
Pemrograman visual
 
Java script
Java scriptJava script
Java script
 
React London April- Fully functional: Central state is a great fit for React ...
React London April- Fully functional: Central state is a great fit for React ...React London April- Fully functional: Central state is a great fit for React ...
React London April- Fully functional: Central state is a great fit for React ...
 
C++ TUTORIAL 2
C++ TUTORIAL 2C++ TUTORIAL 2
C++ TUTORIAL 2
 
Mercado iOS & Swift vs Objective-C
Mercado iOS & Swift vs Objective-CMercado iOS & Swift vs Objective-C
Mercado iOS & Swift vs Objective-C
 
Container adapters
Container adaptersContainer adapters
Container adapters
 

Destaque

2016 Laborshed Executive Summary for Greater Burlington
2016 Laborshed Executive Summary for Greater Burlington2016 Laborshed Executive Summary for Greater Burlington
2016 Laborshed Executive Summary for Greater BurlingtonGreater Burlington Partnership
 
Trabajo práctico de aula Caso Facundo
Trabajo práctico de aula Caso FacundoTrabajo práctico de aula Caso Facundo
Trabajo práctico de aula Caso FacundoPracticaprofesional7
 
2014 Labor Characteristics Report: Warehouse & Distribution
2014 Labor Characteristics Report: Warehouse & Distribution2014 Labor Characteristics Report: Warehouse & Distribution
2014 Labor Characteristics Report: Warehouse & DistributionGreater Burlington Partnership
 
Ricardo Agraz arquitecto
Ricardo Agraz arquitectoRicardo Agraz arquitecto
Ricardo Agraz arquitectoAle Cuevas
 
The Ultimate Guide to Professional Development for Marketing & PR
The Ultimate Guide to Professional Development for Marketing & PRThe Ultimate Guide to Professional Development for Marketing & PR
The Ultimate Guide to Professional Development for Marketing & PRThe Muse
 
The Ultimate Guide to Professional Development for Sales Professionals
The Ultimate Guide to Professional Development for Sales ProfessionalsThe Ultimate Guide to Professional Development for Sales Professionals
The Ultimate Guide to Professional Development for Sales ProfessionalsThe Muse
 
19 Tips That Will Make You a Networking Master
19 Tips That Will Make You a Networking Master19 Tips That Will Make You a Networking Master
19 Tips That Will Make You a Networking MasterThe Muse
 

Destaque (15)

2016 Laborshed Executive Summary for Greater Burlington
2016 Laborshed Executive Summary for Greater Burlington2016 Laborshed Executive Summary for Greater Burlington
2016 Laborshed Executive Summary for Greater Burlington
 
2014 Housing Presentation
2014 Housing Presentation2014 Housing Presentation
2014 Housing Presentation
 
2014 Labor Characteristics Report: Call Centers
2014 Labor Characteristics Report: Call Centers2014 Labor Characteristics Report: Call Centers
2014 Labor Characteristics Report: Call Centers
 
Trabajo práctico de aula Caso Facundo
Trabajo práctico de aula Caso FacundoTrabajo práctico de aula Caso Facundo
Trabajo práctico de aula Caso Facundo
 
Call Center Labor Characteristics Report
Call Center Labor Characteristics ReportCall Center Labor Characteristics Report
Call Center Labor Characteristics Report
 
2014 Labor Characteristics Report: Food Processing
2014 Labor Characteristics Report: Food Processing2014 Labor Characteristics Report: Food Processing
2014 Labor Characteristics Report: Food Processing
 
2014 Labor Characteristics Report: Warehouse & Distribution
2014 Labor Characteristics Report: Warehouse & Distribution2014 Labor Characteristics Report: Warehouse & Distribution
2014 Labor Characteristics Report: Warehouse & Distribution
 
NGOKarma
NGOKarmaNGOKarma
NGOKarma
 
Include
IncludeInclude
Include
 
2014 Laborshed Report (Executive Summary)
2014 Laborshed Report (Executive Summary)2014 Laborshed Report (Executive Summary)
2014 Laborshed Report (Executive Summary)
 
Ricardo Agraz arquitecto
Ricardo Agraz arquitectoRicardo Agraz arquitecto
Ricardo Agraz arquitecto
 
syed mohd naqi zaidi
syed mohd naqi zaidisyed mohd naqi zaidi
syed mohd naqi zaidi
 
The Ultimate Guide to Professional Development for Marketing & PR
The Ultimate Guide to Professional Development for Marketing & PRThe Ultimate Guide to Professional Development for Marketing & PR
The Ultimate Guide to Professional Development for Marketing & PR
 
The Ultimate Guide to Professional Development for Sales Professionals
The Ultimate Guide to Professional Development for Sales ProfessionalsThe Ultimate Guide to Professional Development for Sales Professionals
The Ultimate Guide to Professional Development for Sales Professionals
 
19 Tips That Will Make You a Networking Master
19 Tips That Will Make You a Networking Master19 Tips That Will Make You a Networking Master
19 Tips That Will Make You a Networking Master
 

Semelhante a syed

Cs pritical file
Cs pritical fileCs pritical file
Cs pritical fileMitul Patel
 
Whats new in_csharp4
Whats new in_csharp4Whats new in_csharp4
Whats new in_csharp4Abed Bukhari
 
Computer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperComputer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperDeepak Singh
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple ProgramsUpender Upr
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1kvs
 
Please follow the code and comments for description and outputs C.pdf
Please follow the code and comments for description and outputs C.pdfPlease follow the code and comments for description and outputs C.pdf
Please follow the code and comments for description and outputs C.pdfproloyankur01
 
Distributed systems
Distributed systemsDistributed systems
Distributed systemsSonali Parab
 
java experiments and programs
java experiments and programsjava experiments and programs
java experiments and programsKaruppaiyaa123
 
Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile servicesAymeric Weinbach
 
OOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptxOOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptxSirRafiLectures
 
Advanced Java - Practical File
Advanced Java - Practical FileAdvanced Java - Practical File
Advanced Java - Practical FileFahad Shaikh
 
wcmc_practicals
wcmc_practicalswcmc_practicals
wcmc_practicalsMannMehta7
 
Computer Science Sample Paper 2015
Computer Science Sample Paper 2015Computer Science Sample Paper 2015
Computer Science Sample Paper 2015Poonam Chopra
 

Semelhante a syed (20)

Dotnet 18
Dotnet 18Dotnet 18
Dotnet 18
 
ASP.NET
ASP.NETASP.NET
ASP.NET
 
Ss
SsSs
Ss
 
C++ TUTORIAL 5
C++ TUTORIAL 5C++ TUTORIAL 5
C++ TUTORIAL 5
 
Cs pritical file
Cs pritical fileCs pritical file
Cs pritical file
 
Whats new in_csharp4
Whats new in_csharp4Whats new in_csharp4
Whats new in_csharp4
 
Computer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperComputer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paper
 
C#.net
C#.netC#.net
C#.net
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple Programs
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1
 
Doc 20180130-wa0006
Doc 20180130-wa0006Doc 20180130-wa0006
Doc 20180130-wa0006
 
Please follow the code and comments for description and outputs C.pdf
Please follow the code and comments for description and outputs C.pdfPlease follow the code and comments for description and outputs C.pdf
Please follow the code and comments for description and outputs C.pdf
 
Distributed systems
Distributed systemsDistributed systems
Distributed systems
 
java experiments and programs
java experiments and programsjava experiments and programs
java experiments and programs
 
Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile services
 
OOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptxOOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptx
 
Ac2
Ac2Ac2
Ac2
 
Advanced Java - Practical File
Advanced Java - Practical FileAdvanced Java - Practical File
Advanced Java - Practical File
 
wcmc_practicals
wcmc_practicalswcmc_practicals
wcmc_practicals
 
Computer Science Sample Paper 2015
Computer Science Sample Paper 2015Computer Science Sample Paper 2015
Computer Science Sample Paper 2015
 

Último

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Último (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

syed

  • 1. C# Practical File 2013 By: Syed Mohd Naqi Zaidi using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace neha { class MATRIX { static void Main(string[] str) { Console.WriteLine(" Program to calculate addition of two matrix of size 2*2 "); int[,] m1 = new int[3, 3]; Console.WriteLine(); Console.WriteLine("Enter the Values of 1st matrix : "); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { m1[i, j] = int.Parse(Console.ReadLine()); } } int[,] m2 = new int[3, 3]; Console.WriteLine("Enter the Values of 2nd matrix :"); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { m2[i, j] = int.Parse(Console.ReadLine()); } } int[,] c = new int[3, 3]; Console.WriteLine("The Addtion of Matrix is : "); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { Console.Write((m1[i, j] + m2[i, j]) + " "); } Console.WriteLine(); } Console.ReadLine(); } } } /***WAP to calculate addition of two 2*2 matrix***/
  • 2. C# Practical File 2013 By: Syed Mohd Naqi Zaidi OUTPUT
  • 3. C# Practical File 2013 By: Syed Mohd Naqi Zaidi using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NEHA { class STRING { public static void length() { string s; Console.WriteLine("Enter The String "); s = Console.ReadLine(); Console.WriteLine("Lenght of the String is :" + s.Length); } public static void palindrome() { string str, revstr; Console.WriteLine("Enter Any String to Know It is Palindrome or not"); str = Console.ReadLine(); char[] tempstr = str.ToCharArray(); Array.Reverse(tempstr); revstr = new string(tempstr); bool caseignore = str.Equals(revstr, StringComparison.OrdinalIgnoreCase); if (caseignore == true) { Console.WriteLine("............" + str + " Is a Palindrome.........."); } else { Console.WriteLine("............" + str + " Is Not a Palindrome........"); } } static void Main(string[] args) { length(); palindrome(); Console.ReadLine(); } } } /*** create a class to perform following operations:-  Calculate the length of string.  Check whether the string is a palindrome or not. ***/
  • 4. C# Practical File 2013 By: Syed Mohd Naqi Zaidi OUTPUT
  • 5. C# Practical File 2013 By: Syed Mohd Naqi Zaidi using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace neha { class EVENODD { static void Main(string[] str) { Console.WriteLine("Even" + " " + "ODD"); for (int i = 0; i < 50; i++) { if ((i % 2) == 0) Console.Write(i + " "); else { if ((i % 2) != 0) Console.WriteLine(i); } } Console.ReadLine(); } } } /***WAP to generate series of even and odd numbers separately between 1to50***/
  • 6. C# Practical File 2013 By: Syed Mohd Naqi Zaidi OUTPUT
  • 7. C# Practical File 2013 By: Syed Mohd Naqi Zaidi
  • 8. C# Practical File 2013 By: Syed Mohd Naqi Zaidi using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace neha { class FACTORIAL { public static string rev(string st) { char[] ar = st.ToCharArray(); Array.Reverse(ar); return new string(ar); } static int a, b = 1; static string st; static void Main(string[] str) { Console.Write(" Program to Calculate the Factorial, length, Reverse of the string "); Console.WriteLine(); Console.WriteLine(); Console.Write("Enter the any value:"); a = int.Parse(Console.ReadLine()); for (int i = a; i > 1; i--) { b = b * i; } Console.Write("Factorial number: "); Console.WriteLine(b); st = b.ToString(); st = rev(st); Console.Write("Length of string: "); Console.WriteLine(st.Length); Console.Write("Reverse String: "); Console.WriteLine(st); Console.ReadKey(); } } } /***WAP to find the factorial of given integer, inverse of the number, calculate sum of the digits***/
  • 9. C# Practical File 2013 By: Syed Mohd Naqi Zaidi OUTPUT
  • 10. C# Practical File 2013 By: Syed Mohd Naqi Zaidi Define a class to represent a bank account having following members name, acc. No, type, initial values deposited amt, withdraw amt and display balance. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text.RegularExpressions; using System.Windows.Forms; using System.Collections; using System.Media; using System.Resources; using System.Reflection; using System.Diagnostics; using System.IO; namespace timer_and_acount_prog { public partial class Form1 : Form { public Form1() { InitializeComponent(); } Form2 frm = new Form2(); private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "" || textBox3.Text == "" || (!Regex.IsMatch(textBox1.Text, @"[0-9]") || !(Regex.IsMatch(textBox3.Text, @"[0- 9]")))) { MessageBox.Show("Please Enter the integer value in: " + 'n' + 'n' + " ACCOUNT NO. AND TOTAL AMOUNT", "MANI MESSAGE"); } else if (textBox2.Text == "" || textBox4.Text == "" || (!Regex.IsMatch(textBox2.Text, @"[a-zA-Z]") || !(Regex.IsMatch(textBox4.Text, @"[a-zA-Z]")))) { MessageBox.Show("Please Enter the String in: " + Environment.NewLine+'n' + "NAME AND ACCOUNT TYPE", "MANI MESSAGE"); } else { frm.a = int.Parse(textBox1.Text); frm.b = int.Parse(textBox3.Text); frm.d = button1.Text; frm.Show();
  • 11. C# Practical File 2013 By: Syed Mohd Naqi Zaidi this.Hide(); } } private void button3_Click(object sender, EventArgs e) { if (textBox1.Text == "" || textBox3.Text == "" || (!Regex.IsMatch(textBox1.Text, @"[0-9]") || !(Regex.IsMatch(textBox3.Text, @"[0- 9]")))) { MessageBox.Show("Please Enter the integer value in: " + 'n' + 'n' + " ACCOUNT NO. AND TOTAL AMOUNT", "MANI MESSAGE"); } else if (textBox2.Text == "" || textBox4.Text == "" || (!Regex.IsMatch(textBox2.Text, @"[a-zA-Z]") || !(Regex.IsMatch(textBox4.Text, @"[a-zA-Z]")))) { MessageBox.Show("Please Enter the String in: "+ Environment.NewLine+'n' +"NAME AND ACCOUNT TYPE", "MANI MESSAGE"); } else { frm.a = int.Parse(textBox1.Text); frm.b = int.Parse(textBox3.Text); frm.d = button3.Text; frm.Show(); this.Hide(); } } private void Form1_Load(object sender, EventArgs e) { } private void button4_Click(object sender, EventArgs e) { this.Close(); } private void button2_Click(object sender, EventArgs e) { MessageBox.Show("Account No.: " + textBox1.Text.ToString() + 'n' + 'n' + "Name Is: " + textBox2.Text + 'n' + 'n' + "Total Amount: " + textBox3.Text.ToString() + 'n' + 'n' + label4.Text + ": " + textBox4.Text, "MANI MESSAGE"); } } } FORM 2 using System;
  • 12. C# Practical File 2013 By: Syed Mohd Naqi Zaidi using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text.RegularExpressions; using System.Windows.Forms; namespace timer_and_acount_prog { public partial class Form2 : Form { public int a, b, c; public string d,s; public Form2() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Form1 f = new Form1(); if (textBox5.Text == "" || (!Regex.IsMatch(textBox5.Text,@"[0-9]"))) { MessageBox.Show("Please Enter the integer value"); } else { c = int.Parse(textBox5.Text); if (label5.Text == "Deposit") { textBox2.Text = (b + c).ToString(); } else { if (b > c) { textBox2.Text = (b - c).ToString(); } else MessageBox.Show("Your Amount Is More than total Amount "+'n'+" Your Current Balance is: "+b); } MessageBox.Show("ACCOUNT NO. " + textBox1.Text + " " + " Balance Is " + textBox2.Text, "KALRA BANK ;) :P"); } } private void Form2_Load(object sender, EventArgs e) { Form1 f = new Form1(); f.Hide(); textBox1.Text = a.ToString(); label5.Text = d; label5.Visible = true; textBox5.Visible = true; textBox1.ReadOnly = true; }
  • 13. C# Practical File 2013 By: Syed Mohd Naqi Zaidi private void button2_Click(object sender, EventArgs e) { Form1 frm = new Form1(); this.Close(); frm.Show(); } } }
  • 14. C# Practical File 2013 By: Syed Mohd Naqi Zaidi OUTPUT:-
  • 15. C# Practical File 2013 By: Syed Mohd Naqi Zaidi Swap two values using call by reference . a) Create a method using reference parameter to calculate square of no. b) Create a class by name decompose that separates the integer no and fractional part of given floating point no. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Swap { class Swapping { class Swap { public void swap(ref int a, ref int b) { int t; t = a; a = b; b = t; } static void squareRef(ref int refParameter) { refParameter *= refParameter; } public class SwapDemo { public static void Main() { Swap ob = new Swap(); int x = 10, y = 20; Console.WriteLine("X and Y Before call: " + x + " " + y); ob.swap(ref x, ref y); Console.WriteLine("X and Y After call: " + x + " " + y); int arg; arg = 5; squareRef(ref arg); Console.WriteLine("Square Of a Number is :"+arg); Console.Read(); } } } } }
  • 16. C# Practical File 2013 By: Syed Mohd Naqi Zaidi