codemultiplex-blog
codemultiplex-blog
Code Multiplex Computing Portal for Multitasking Nerds.
97 posts
Don't wanna be here? Send us removal request.
codemultiplex-blog · 7 years ago
Text
Program to create and use of DLL in C#
Program to create and use of DLL in C#
Program to Create and use DLL in C#.
  Below are steps for execution of this program.
This code is executed in visual studio 2010.
  Class1.cs
  using System;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
  namespace ClassLibrary5
{
public class Class1
{
public int add(int a, int b)
{
int c = a + b;
return c;
}
}
}
  Consoleapplication5.cs
using System;
usingSystem.Collecti…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Program to use the Intrinsic Objects in JSP
Program to use the Intrinsic Objects in JSP
Program to use the Intrinsic Objects in JSP
  Below  is the example of Intrinsic Objects in JSP. A simple JSP application to display values obtained from the use of intrinsic objects of various types. Follow the steps to execute the below code:
The code is executed in net beans using glass fish server.
Take a new project–> give the name of project.
In the projects section–>click on your project…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
JSP page to demonstrate the use of Expression language.
JSP page to demonstrate the use of Expression language.
 JSP page to demonstrate the use of Expression language.
  The below program is executed in net beans. This is an example of using jsp page and the use of expression language in it. The index.html contains the design part and the display.jsp contains the actual part i.e. logic part. The main logic is written in the display.jsp page. Here we have done all arithmetic operations using this jsp page.…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Response Implicit Object in jsp
Response Implicit Object in jsp
Write a Program of Response Implicit Object in jsp
  This is servlet program which is executed in netbeans. Using implicit object we redirect one page to other page.Response Implicit Object are predefined variables. Here HttpServletRequest  Object is associated with the request. HttpServletResponse  object is associated with the client response.
We use javax.servlet.http.HttpServletRequest as an…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Sum of even number of 1st "n" natural number
Sum of even number of 1st “n” natural number
Write a program  for Sum of even number of “1st” n natural numbers.
   .Net is not a programming language it is a framework.
C# is the programming language which is used to code.
C# is  combination of “C”and “C++” language or we can say that it is derived from this two languages. 
 The program is executed in visual studio. 
At the end the output is attached , this will help you to understand the…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Program to count the digits entered by user
Program to count the digits entered by user
 Write a Program to count the digits entered by user.
   .Net is not a programming language it is a framework.
C# is the programming language which is used to code.
C# is  combination of “C”and “C++” language or we can say that it is derived from this two languages. 
 The program is executed in visual studio. 
At the end the output is attached , this will help you to understand the code in a…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Servlet demonstrating the use of session creation and destruction
Servlet demonstrating the use of session creation and destruction
Servlet demonstrating the use of session creation and destruction.
  //Executed in Netbeans using Glassfish server.
  //index.html
  Index.html
  <html>
<head>
<title>TODO supply a title</title>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
</head>
<body>
     <form action=”page1″ method=”get” >
  Enter User ID <input type=”text” name=”txtName”><br>
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Program to create a Servlet that uses Cookies
Program to create a Servlet that uses Cookies
Program to create a Servlet that uses Cookies.
// Executed in Netbeans using glassfish server.
  //index.html
<html>
<head>
<title>TODO supply a title</title>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
</head>
<body>
<form action=”page1″ method=”GET”>
  Enter Your Name <input type=”text” name=”txtName”><br>
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Swap two Integer numbers and swap two Float numbers
Swap two Integer numbers and swap two Float numbers
Write a Program using function overloading to Swap two Integer numbers and swap two Float numbers.
  using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace swap { class Overloading { public void swap(ref int n, ref int m) { int t; t = n; n = m; m = t; } public void swap(ref float f1, ref float f2) { float f; f = f1; f1 = f2; f2 = f; } } class program {
sta…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Using Request Dispatcher Interface create a Servlet
Using Request Dispatcher Interface create a Servlet
Write a Program Using Request Dispatcher Interface create a Servlet.
  // This is executed in netbeans with glass fish server.
  //Using Request Dispatcher Interface create a Servlet which will validate the password entered by the user, if the user has entered “Servlet” as password, then he will be forwarded to Welcome Servlet else the user will stay on the index.html page and an error message…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Program to find entered alphabet is vowels or not in C#
Program to find entered alphabet is vowels or not in C#
Write Program to find entered alphabet is vowels or not in C#.
  using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace ConsoleApplication4 { class Program { static void Main(string[] args) { char ch; Console.Write(“Enter a character : “); ch = (char)Console.Read(); switch (ch) { case ‘a’: case ‘A’: case ‘e’: case ‘E’: case ‘i’: case ‘I’: case ‘o’: case ‘O’:
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Program to reverse a number and find sum of digits in C#
Program to reverse a number and find sum of digits in C#
Write a Program to reverse a number and find sum of digits in C#.
  // Program:
using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace ConsoleApplication3 { class Program { static void Main(string[] args) { int num, actualnumber, revnum = 0, digit, sumDigits = 0; Console.Write(“Enter number:”); num = int.Parse(Console.ReadLine()); actualnumber = num; while…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Program to generate Prime numbers in C#
Program to generate Prime numbers in C#
Write a Program to generate Prime numbers in C#
//program:
    using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
int counter, lowerlimit, upperlimit, limitCounter; Console.Write(“Enter lowerlimit:”); lowerlimit = int.Parse(Console.ReadLine()); Console.Write(“Enter upperlimit:”); up…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Program to test entered number is Prime or Not in C#
Program to test entered number is Prime or Not in C#
Write a Program to test entered number is Prime or Not in C#
  // Using Conditional Loop Statements.
  using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int num, counter; Console.Write(“Enter number:”); num = int.Parse(Console.ReadLine()); for (counter = 2; counter
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Program for array search ,reverse & sorting elements in C++
Program for array search ,reverse & sorting elements in C++
Write a program for array search ,reverse & sorting elements in C++
    //Menu Driven
  #include<iostream.h>
#include<conio.h>
  void main ()
{
clrscr();
int a[10],n, flag = 0,input,i;
char choice;
cout<<“Enter no. of elements you want in array:”;
cin>>n;
  cout<<“Enter array elements:”;
for(i=0;i<n;i++)
cin>>a[i];
  cout<<“Enter 1 for searching\n”;
cout<<“Enter 2  for reversing\n”;
cout
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Program for merging two arrays in sorted order in c++
Program for merging two arrays in sorted order in c++
Write a Program Program for merging two arrays in sorted order in c++
  #include<iostream.h>
#include<conio.h>
  void main()
{
clrscr();
int a[5],b[5],c[10],i,j,temp;
clrscr();
  cout<<“Enter 5 Elements in 1st Array: “;
for(i=0;i<5;i++)
{
cin>>a[i];
}
cout<<“Enter 5 Elements in 2nd Array: “;
for(i=0;i<5;i++)
{
cin>>b[i];
}
  //merging 2 arrays
for(i=0;i<5;i++)
{
c[i]=a[i];
c[i+5]=b[i];
}
  //sort…
View On WordPress
0 notes
codemultiplex-blog · 7 years ago
Text
Matrix Multiplication,Addition & Transpose operation in C++
Matrix Multiplication,Addition & Transpose operation in C++
Write a Program for Matrix Multiplication, Addition & Transpose operation in C++
    //  It is menu Driven
  #include<iostream.h>
#include<conio.h>
  void main ()
{
clrscr();
  int i,j,k,choice;
int mat1[3][3]={ {1,2,3}, {4,5,6}, {7,8,9} };
int mat2[3][3]={ {10,11,12}, {13,14,15}, {16,17,18} };
  cout<<“Enter 1 for addition.\n”;
cout<<“Enter 2 for Multiplication.\n”;
cout
View On WordPress
0 notes