SlideShare una empresa de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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
 

Similar 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
 

Similar 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

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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