Thursday, June 02, 2011

Calculation

#!/bin/sh
if [ $# -ne 2 ]
then
echo "Please Enter 2 Numbers !!! "
else
echo "Enter First Number : "
read a
echo "Enter Second Number : "
read b
c=echo "Enter The Operation You want To Calculate : "
echo "+ For Addition"
echo "- For Subtraction"
echo "* For Multiplication"
echo "/ For Division"
case $d in
+) c=$( expr $a + $b )
-) c=$( expr $a - $b )
*) c=$( expr $a \* $b )
/) c=$( expr $a / $b )
esac
echo "The Answer is : " $c
exit 0

Program to Find the Sum of the Digits of a Number

import java.io.*;
class Add
{
void number()
{
try
{
int num,sum=0;
System.out.println("Enter any number:");
DataInputStream dts=new DataInputStream(System.in);
int n=Integer.parseInt(dts.readLine());
while ( n > 0 )
{
num = n % 10;
n = n / 10;
sum = sum + num;
}
System.out.println("The sum of the digits is:"
+sum);
}
catch(Exception s)
{
System.out.println(s.getMessage());
}
}
}
class Digit_add
{
public static void main(String args[])
{
Add a = new Add();
a.number();
}
}

Some hidden programs in window xp

Some hidden programs in window xp
Programs :

1. Private Character Editor :
Used for editing fonts,etc.
** start>>Run

** Now, type eudcedit

2. Dr. Watson :
This an inbuilt windows repairing software !
** start>>Run
** Now, type drwtsn32

3. Media Player 5.1 :
Even if you upgrade your Media Player, you can still access your old player in case the new one fails !!!
** start>>Run
** Now, type mplay32

4. iExpress :
Used to create Setups
You can create your own installers !
** start>>Run
** Now, type iexpress