Verilog HDL Program for 3-8 ENCODER

Simulated waveform for 3-8 Encoder Saturday, June 2nd, 2012  »  Posted By  »  Total 0 Comment

An encoder is a device, circuit, transducer, software program, algorithm or person that converts information from one format or code to another, for the purposes of standardization, speed, secrecy, security, or saving space by shrinking size. 1 2 3 4 5 6 7 8 9 10 11 12 13 module encoder83(o,i); output [2:0]o; input [7:0]i; […]

Java program to display Local machines IP Address

Friday, April 30th, 2010  »  Posted By  »  Total 1 Comment

Program : To display Local machines IP Address By : Kapil Lohia import java.net.*; import java.io.*;   public class ip_localmachine { public static void main(String args[]) throws Exception { InetAddress ipadd =InetAddress.getLocalHost(); System.out.println("Host and Address :"+ipadd); System.out.println("Host name :"+ipadd.getHostName());   String n=ipadd.toString(); System.out.println("IP address :"+n.substring(n.indexOf("/")+1)); } }

C++ program to solve the single source shortest path problem Using Dijkstra’s algorithm

Thursday, March 11th, 2010  »  Posted By  »  Total 11 Comments

/* Write a C++ program to solve the single source shortest path problem using Dijkstra’s algorithm */ #include<iostream> #include<conio.h> #include<stdio.h> using namespace std; int shortest(int ,int); int cost[10][10],dist[20],i,j,n,k,m,S[20],v,totcost,path[20],p; main() { int c; cout <<"enter no of vertices"; cin >> n; cout <<"enter no of edges"; cin >>m; cout <<"\nenter\nEDGE Cost\n"; for(k=1;k<=m;k++) { cin >> i […]

Java Program for calculator

Thursday, December 3rd, 2009  »  Posted By  »  Total 2 Comments

JPanel p = new JPanel();
p.setLayout(new GridLayout(4, 4));
String buttons = “789/456*123-0.=+”;
for (int i = 0; i < buttons.length(); i++)
addButton(p, buttons.substring(i, i + 1));
add(p, “Center”);

Java program that prints all real solutions to the quadratic equation ax2+bx+c=0

Friday, October 2nd, 2009  »  Posted By  »  Total 6 Comments

Write a Java program that prints all real solutions to the quadratic equation ax2+bx+c=0. Read in a,b,c and use the quadratic formula.If the discriminant b2-4ac is negative, display a message stating that there are no real roots.

C program to find the Shortest path for a given graph

Sunday, September 20th, 2009  »  Posted By  »  Total 7 Comments

OUTPUT:
enter the cost matrix :
0 1 4 2 0
0 0 0 2 3
0 0 0 3 0
0 0 0 0 5
0 0 0 0 0
enter number of paths : 4
enter possible paths :
1 2 4 5 0
1 2 5 0 0
1 4 5 0 0
1 3 4 5 0
minimum cost : 4
minimum cost path :
1–>2–>5

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup

Email: